IfMsgBox

Checks which button was pushed by the user during the most recent MsgBox command.

IfMsgBox, ButtonName

Parâmetros

ButtonName

One of the following strings to represent which button the user pressed in the most recent MsgBox command:

MsgBox

Exemplos

Shows a yes-no message box which automatically stops execution after 5 seconds. The user can press the "No" button to initiate the stop immediately.

MsgBox, 4, , Would you like to continue?, 5  ; 5-second timeout.
IfMsgBox, No
    Return  ; User pressed the "No" button.
IfMsgBox, Timeout
    Return ; i.e. Assume "No" if it timed out.
; Otherwise, continue:
; ...