Matthew VanDerlofske Posted March 28, 2006 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
Moderators SmOke_N Posted March 28, 2006 Moderators 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.
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