IfMsgBox


检测用户在最近的 MsgBox/消息框 命令点击了哪个按钮。

IfMsgBox, ButtonName

参数

ButtonName

下方的字符串代表用户在最近的 MsgBox/消息框 命令中点击的按钮。

Yes
No
OK
Cancel
Abort
Ignore
Retry
Continue [v1.0.44.08+]
TryAgain [v1.0.44.08+]
Timeout (也就是说,单词“timeout”表示消息框 timed out/超时

相关命令

MsgBox

示例

MsgBox, 4, , Would you like to continue?, 5  ; 5秒超时时间。
IfMsgBox, No
    Return  ; 用户点击了“No/否”按钮。
IfMsgBox, Timeout
    Return ; 即假定超时和“No/否”一样对待。
; 否则,继续:
...