Jump to content
Sign in to follow this  
mobamoba

ControlCommand Question

Recommended Posts

I'm trying to write a script that will check to see if a box is checked. If it's not checked, I want the script to check it; if it is already checked, I want the script to cancel the dialog box and end. I see that ControlCommand can check to see if something is checked or unchecked, but I don't know what it means to "Return 1" if checked - return 1 to what? Where does the value get returned? Thanks in advance.

Share this post


Link to post
Share on other sites

I'm trying to write a script that will check to see if a box is checked. If it's not checked, I want the script to check it; if it is already checked, I want the script to cancel the dialog box and end. I see that ControlCommand can check to see if something is checked or unchecked, but I don't know what it means to "Return 1" if checked - return 1 to what? Where does the value get returned? Thanks in advance.

It returns 1 or 0 to the script so that you can determin if the checkbox is checked or not.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

I searched the forum and couldn't find anything. What I don't understand is WHERE the ControlCommand value gets returned. Is it an IF/THEN statement - If ControlCommand ("blahblah")=1 THEN... How does my script know what number is being returned?

Share this post


Link to post
Share on other sites

Take a look for yourself :o

MsgBox(0, 'Returned Value Of Command', ControlCommand('Title', 'Text', 'ControlID', 'Command', 'Option'))

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...