Sign in to follow this  
Followers 0
arminius

how to suspend sections of script

3 posts in this topic

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?

Share this post


Link to post
Share on other sites



#comments-start

...

...

#comments-end

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0