Collin Posted November 26, 2007 Posted November 26, 2007 (edited) ok I feel like I'm missing something I'm sure this is feasable, so please help Running a program Multiple nested if and do statements however within a few of them are points which "stop the process" and start at square one with the way I have it though now the timers make it wait a long time even with the stops working properly Sooo I'd like to find a way, when one of these stops happen.. to just "go to line X" and start the code from there again so I don't have to go through the rest of the damn process (oh I can't restart the whole program because there are input parts I don't want to have to redo if I'm not at the window and it restarts, so like at line 50 it would start or 100 or whatever) Any help would be appriciated Collin Edited November 26, 2007 by Collin
martin Posted November 26, 2007 Posted November 26, 2007 (edited) ok I feel like I'm missing something I'm sure this is feasable, so please help Running a program Multiple nested if and do statements however within a few of them are points which "stop the process" and start at square one with the way I have it though now the timers make it wait a long time even with the stops working properly Sooo I'd like to find a way, when one of these stops happen.. to just "go to line X" and start the code from there again so I don't have to go through the rest of the damn process (oh I can't restart the whole program because there are input parts I don't want to have to redo if I'm not at the window and it restarts, so like at line 50 it would start or 100 or whatever) Any help would be appriciated Collin Sounds like you might need to rethink the way you write your script, A GOTO should not be needed and even if it were available in AutoIt I would recommend that it was never used. Can you give an example of your code? If you split sections up into functions here's one way could control the program flow with a stage variable. $stage = 1 while 1 Switch $stage case 1 test1() $stage = 2;we'll go to the next stage case 2 if test2() then $stage = 3 else $stage = 5;failed so jump to stage 5 endif case 3 . . . endswitch wend Edited November 26, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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