Msgbox select Branch
Code:
Msgbox, 4. Please select. If you are sure, click yes. If you give up, click NO, 5.
Ifmsgbox, yes
Msgbox, you have selected OK
Ifmsgbox, no
Msgbox, you have chosen to give up
Ifmsgbox, timeout
Msgbox, you have timed out!
Return
Description 1:
The msgbox command has two formats: msgbox and text
Msgbox [, type, title, content, display time]
Type:
OK 0 OK/cancel 1 abort/retry/ignore 2
Yes/No/cancel 3 Yes/No 4
Retry/cancel 5 icon hand (stop/error) 16
Icon question 32 icon exclamation 48
Icon asterisk (Info) 64
Make 2nd button the default 256
Make 3rd button the default 512
System Modal (always on top) 4096
Task modal 8192
These types can be added. If you want to display a dialog box containing the yes/no button, the dialog box is always at the top.
Display, you can add 4 and 4096 to 4100,CodeAs follows:
Msgbox, 4100, please select, click yes, give up, click NO
NOTE 2:
the ifmsgbox command detects and processes the dialog box buttons generated by the msgbox command. The format is:
ifmsgbox, buttonname
the options of buttonname are: yes, no, OK, cancel, abort, ignore, retry, and timeout.