MaCgyver Posted February 8, 2006 Share Posted February 8, 2006 I am a newbie, but I've been learning. I want the user to either click the yes or no in the message box and a particular result happens depending on what they click. I was looking up return, but I'm not sure if that is the right area to be in. Link to comment Share on other sites More sharing options...
Josbe Posted February 8, 2006 Share Posted February 8, 2006 (edited) I am a newbie, but I've been learning. I want the user to either click the yes or no in the message box and a particular result happens depending on what they click. I was looking up return, but I'm not sure if that is the right area to be in.$sAnswer = MsgBox( 4 , "Question", "Yes or Not?") IF $sAnswer = 6 Then MsgBox(0, "", "You click 'YES'") Else MsgBox(0, "", "You click 'NO'") EndIf Read in the help about the flags -> Msgbox Edited February 8, 2006 by Josbe AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
MuffinMan Posted February 8, 2006 Share Posted February 8, 2006 Thanks for the code example JosBe, I read thru that section of the help file but it didn't click with me to set the msgbox as a variable. I love reading thru these posts, I am learning so much about AutoIT. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 9, 2006 Moderators Share Posted February 9, 2006 You don't have to use a variable in this case, but most do.IF MsgBox( 4 , "Question", "Yes or Not?") = 6 Then MsgBox(0, "", "You click 'YES'") Else MsgBox(0, "", "You click 'NO'") EndIf Just thought I'd throw that in there, since you said you were 'learning so much' a bit more food for thought for ya. 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. Link to comment Share on other sites More sharing options...
MaCgyver Posted February 9, 2006 Author Share Posted February 9, 2006 You don't have to use a variable in this case, but most do.IF MsgBox( 4 , "Question", "Yes or Not?") = 6 Then MsgBox(0, "", "You click 'YES'") Else MsgBox(0, "", "You click 'NO'") EndIf Just thought I'd throw that in there, since you said you were 'learning so much' a bit more food for thought for ya. Thanks a million. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 9, 2006 Moderators Share Posted February 9, 2006 Hmmm, you should truly be thanking Josbe, I was just adding a little something in there. But, your quite welcome all the same. 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now