Jump to content

Recommended Posts

Posted

Basically I'm trying to figure out what would be the most efficient means of making multiple use buttons.  What I'd like is to be able to click a button and pop up a msgbox to gather some info, or two message boxes, but upon entering that info and the msgbox dialogue being over, it'll then switch to a different function.  I was thinking of using 1/0 to designate which is true or not, but not sure if that'd be the most efficient way.  Still very new to coding, and autoit, any help would be great!

Posted

There are lot's of ways you can do this, all of which require evaluating either a flag (tracking variable) or other state mechanism.  This could be a boolean variable (1/0 or True/False like you mentioned), an incremental variable (for multiple states...1,2,3...), or even the string text value of the button that gets set/changed at the beginning or completion of the button action.  For all cases you need your button function to evaluate which ever state mechanism you choose and act appropriately.  

Feel free to try a few things out and post some code when you get stuck and we'll take a look and make further recommendations.

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
×
×
  • Create New...