Matthew VanDerlofske Posted March 28, 2006 Share Posted March 28, 2006 I know that this is a vary easy question for someone to answer. How do I check what button was pressed when your using a msgbox Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 28, 2006 Moderators Share Posted March 28, 2006 (edited) The MsgBox() buttons all have values:Button Pressed Return Value OK 1 CANCEL 2 ABORT 3 RETRY 4 IGNORE 5 YES 6 NO 7 TRY AGAIN ** 10 CONTINUE ** 11 So, you could do it a couple of ways: Example:$Msg_Box = MsgBox(4, 'Continue', 'Do you want to continue?') If $Msg_Box == 7 Then MsgBox(0, 'OK', 'You will be exited now', 2) Exit EndIf Or another Example:If MsgBox(4, 'Continue', 'Do you want to continue?') == 7 Then MsgBox(0, 'OK', 'You will be exited now', 2) Exit EndIf Edit: Fixed Code Tag Edited March 28, 2006 by SmOke_N 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...
Matthew VanDerlofske Posted March 28, 2006 Author Share Posted March 28, 2006 Thanks 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