arminius Posted June 12, 2008 Posted June 12, 2008 I've written a long section of code in a script but there's certain parts that I want to remove from the process, but I might be needing to switch them back on I'm not wanting to delete them so is there away of telling AutoIT to just skip over this section of code and go to what's next? something I put at the start and end of what I want ignored and then if I want to turn it back on I simply delete the inhibiters?
PsaltyDS Posted June 12, 2008 Posted June 12, 2008 (edited) I've written a long section of code in a script but there's certain parts that I want to remove from the process, but I might be needing to switch them back on I'm not wanting to delete them so is there away of telling AutoIT to just skip over this section of code and go to what's next? something I put at the start and end of what I want ignored and then if I want to turn it back on I simply delete the inhibiters? I would use flag variables (if you feel geeky you could use individual flag bits in a single word): Global $fOne = False, $fTwo = True While 1 If $fOne Then _FunctionOne() If $fTwo Then _FunctionTwo() WEnd In the above code you can turn those functions on and off by toggling the associated flag variables. Edited June 12, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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