YESNO

Syntax: #YE question yes-command no-command

Displays a dialog box that asks the specified question. If the Yes button is clicked, the yes-command is executed. If the No button is clicked, the no-command is executed. If <Escape> is pressed, then no command is executed.

You can customize the buttons by placing the caption you want for the button in front of the command, separated by a colon. For example {Sword:get sword} creates a button labeled "Sword" which executes the command "get sword" when clicked. Using these custom buttons, you can add as many buttons to the YESNO command as you want. If you put an asterisk * at the beginning of a button caption, that button is flagged as the default button.

YESNO examples

#YESNO "Do you want to sac the corpse?" {sac corpse}
Displays a standard Yes/No dialog. If Yes is clicked, the corpse is sacrificed.
 
#YESNO "Where to you want to go today?" {Temple:.temple} {Guild:.guild} {*Microsoft:#URL http://www.microsoft.com}
Displays a dialog with three buttons, labeled: Temple, Guild, and Microsoft, respectively. The Microsoft button is the default button because of the * in the caption. If the Temple button is clicked, the command .temple is executed, which speedwalks to the temple path. The Guild button works in the same way. If the Microsoft button is clicked, the #URL command sends your web browser to the Microsoft site.


Contents WRITE