Jump to content

Recommended Posts

  • Moderators

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 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

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
 Share

  • Recently Browsing   0 members

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