Top  Previous  Next

QuestionBox "Message" /ContinueOnYes /ContinueOnNo /beep


Displays a question box with the specified text and the buttons "yes" and "no". Use \n for line breaks in the message.


The parameters /ContinueOnYes or /ContinueOnNo defines which button must be clicked to continue the script, otherwise the script will be aborted. If no parameter is specified, then the script will be continued independently from the clicked button. The info which button has been clicked is available via the function GetQuestionBoxResult  (see example below).


The parameter /beep plays a short sound.



QuestionBox "Start this script?" /ContinueOnYes /beep
QuestionBox "Question\nAbort this script?" /ContinueOnNo /beep
QuestionBox "Click yes or no"
if GetQuestionBoxResult="yes" then MessageBox "yes has been clicked"
if GetQuestionBoxResult="no" then MessageBox "no has been clicked"