Sign in to follow this  
Followers 0
dpaschal

Test Yes/no Return On Msgbox()

6 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  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

Share this post


Link to post
Share on other sites

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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

excellent! That is what I needed. Thanks for the quick responses guys.

always glad to help.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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