QuestionBox "Message" /ContinueOnYes /ContinueOnNo /beep


Displays a question box with the specified text and the buttons "Yes" and "No". Use \n to insert line breaks in the message.


The parameters /ContinueOnYes or /ContinueOnNo define which button must be clicked to continue the Script. If the required button is not clicked, the Script is aborted. If no parameter is specified, the Script continues regardless of which button is clicked. Information about which button was clicked is available through the function GetQuestionBoxResult (see example below).


The parameter /beep plays a short sound.


Example:

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"