superboss Posted December 16, 2006 Posted December 16, 2006 I will sever my left arm off clean at the shoulder blade for the GoTo Command in Autoit. What can I do, I know its not available. I know I am a sloppy programmer, but Ive been battling for days to get the correct While and Loops and Nested if's going and its driving me nuts when a simple GoTo command would solve all my problems. I dont care if its sloppy. Please tell me there is a version out there with the GoTo command added in, I read somewhere that the developer said if there was enough call for it he would add it back in? Is there a custom version out there somwhere with this command included? Please please please
superboss Posted December 16, 2006 Author Posted December 16, 2006 I am actually considering using AutoHotKey just because it has that command Please stop me from going to the Dark Side
MHz Posted December 16, 2006 Posted December 16, 2006 Welcome, But functions are so much more cooler to use. Just adjust to a better change.
herewasplato Posted December 16, 2006 Posted December 16, 2006 ...when a simple GoTo command would solve all my problems...Does this thread help?http://www.autoitscript.com/forum/index.ph...st&p=280843 [size="1"][font="Arial"].[u].[/u][/font][/size]
superboss Posted December 16, 2006 Author Posted December 16, 2006 Thanks for the reply, but it doesnt help me. My problem is that I have lots of Functions I have coded, and some of the functions are nested in other functions. And at any point in time a user can leave or do something that must make the program go to the begining again. I have a Return command, but that puts me back at the parent function. I have an ExitLoop function, but again, that just end the current While statement. What I really want is, if user exits, then GoTo, beginning of program again. Its just really getting the better of me not having a simple GoTo command. One thing I can think of is creating an entire copy of my code as a Function, then simply call the Function as a goto, but man Im not sure what would happen with the Global variable values, and memory leak and such. I just wish a goto command was there :-(
herewasplato Posted December 16, 2006 Posted December 16, 2006 ...I have an ExitLoop function, but again, that just end the current While statement...ExitLoop [level] Perhaps if you show us your code or a small example of how you coded your script - we might be able to suggest a better layout. [size="1"][font="Arial"].[u].[/u][/font][/size]
Developers Jos Posted December 16, 2006 Developers Posted December 16, 2006 (edited) I just wish a goto command was there :-(Aint going to happen !Just learn some programming basics and you won't miss it .. Edited December 16, 2006 by JdeB SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past.Â
superboss Posted December 16, 2006 Author Posted December 16, 2006 ExitLoop [level] Perhaps if you show us your code or a small example of how you coded your script - we might be able to suggest a better layout. Dude!!! Thanks Yes, thats all I need, I never noticed the level option for the exit loop, that would help me enough to do what I want to do....I think. Sorry cant show you the code top secret But that should help me now, my code was getting stuck one level too low down, now that problem will go away I should be able to actually finish my code now. Still would love the GoTo command though. But its 5am now, been coding since 10am, think I need some sleep Thanks again
herewasplato Posted December 16, 2006 Posted December 16, 2006 Dude!!! ThanksYou are welcome...For future problems/posts with top secret code - just make an example script. [size="1"][font="Arial"].[u].[/u][/font][/size]
Curtiss W. Posted December 22, 2006 Posted December 22, 2006 I was looking for the goto command myself. After a few hours of playing with the Func command I was able to make it work. I can see why learing that was important, but I did finally figure out how to create a goto like command. It was prety simple and I could have shot myself for not figureing it out sooner. I tried to use a null variable but AutoIT did not like that.Curtiss W.CODE; Adding a goto like fuction in AutoIT V3.; All you need to do is add a variable early in you program. I am going to call; mine goto1. (Then any where you really need to use a goto command you can just; uase a If Then statement.$goto1 = "1" ;Setting up the goto variableIf $goto1 = "1" Then label_name() ; Change label name to the name you are using. Thanks for the reply, but it doesnt help me.My problem is that I have lots of Functions I have coded, and some of the functions are nested in other functions.And at any point in time a user can leave or do something that must make the program go to the begining again.I have a Return command, but that puts me back at the parent function.I have an ExitLoop function, but again, that just end the current While statement.What I really want is, if user exits, then GoTo, beginning of program again.Its just really getting the better of me not having a simple GoTo command.One thing I can think of is creating an entire copy of my code as a Function, then simply call the Function as a goto, but man Im not sure what would happen with the Global variable values, and memory leak and such.I just wish a goto command was there :-(
GEOSoft Posted December 22, 2006 Posted December 22, 2006 (edited) I will sever my left arm off clean at the shoulder blade for the GoTo Command in Autoit.What can I do, I know its not available.I know I am a sloppy programmer, but Ive been battling for days to get the correct While and Loops and Nested if's going and itsdriving me nuts when a simple GoTo command would solve all my problems.I dont care if its sloppy.Please tell me there is a version out there with the GoTo command added in, I read somewhere that the developer said if therewas enough call for it he would add it back in?Is there a custom version out there somwhere with this command included?Please please please GoTo is a thing of the past in AutoIt (Last was in AutoIt2) and you wouldn't believe the fuss that was created when it disappeared. I was one of the guilty parties that created a fussActually when you look at it there is no difference betweenIf <condition> Then GoTo<sub>andIf <condition> then Function()The difference is that instead of being called a sub it's called a functionNow it seems that languages that use GoTo and/or GoSub are a bit on the archic side. Edited December 22, 2006 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
NELyon Posted December 22, 2006 Posted December 22, 2006 GoTo is a thing of the past in AutoIt (Last was in AutoIt2) and you wouldn't believe the fuss that was created when i disappeared. I was one of the guilty parties that created a fussReally? People missed you that much?
GEOSoft Posted December 22, 2006 Posted December 22, 2006 Really? People missed you that much?OK I'll edit that George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now