Jump to content

Recommended Posts

Posted

I know what the yes and no options return for the msgbox() function(6 and 7 respectively), but I am not sure how to test and figure out which one returned. I ran the autoit123 and also looked in help, but I can't find it. Help anyone? I know it has to be simple like if $?=6 then do something, but I can't seem to figure it out.

Posted (edited)

if you go to Scite

press Tools > Code Wizard

the first page is a message box builder you can use to create and test message boxes... then

Press Copy and it will copy the info to the Scite Screen

8)

Edited by Valuater

NEWHeader1.png

Posted

I know what the yes and no options return for the msgbox() function(6 and 7 respectively), but I am not sure how to test and figure out which one returned. I ran the autoit123 and also looked in help, but I can't find it. Help anyone? I know it has to be simple like if $?=6 then do something, but I can't seem to figure it out.

no problem, welcome to the forum. assign the msgbox call to a variable, the value returned will be stored in the variable...

ex:

$blah = msgbox(4,"blah","pick yes or no")
if $blah = 6 then 
msgbox(0,"you picked","you clicked yes")
else
msgbox(0,"you picked","you clicked no")
EndIf
Posted

no problem, welcome to the forum. assign the msgbox call to a variable, the value returned will be stored in the variable...

ex:

$blah = msgbox(4,"blah","pick yes or no")
if $blah = 6 then 
msgbox(0,"you picked","you clicked yes")
else
msgbox(0,"you picked","you clicked no")
EndIf
excellent! That is what I needed. Thanks for the quick responses guys.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...