Zum Hauptinhalt springen

IndyMsgBoxYesNo

Structure

IndyMsgBoxYesNo(sQuestion: Text)

Type

Function

Description

This function displays the sQuestion text in a small dialog. This dialog has 'Yes' and 'No' buttons. The function result is either 1 or 0 (integers), based on the 'Yes' or 'No' response.

Parameters: 1

sQuestion = the text displayed in the dialog

Return Value

Text, '1' or '0'. Note: this '1' or '0' is automatically evaluated as a boolean when used in an 'if' statement, or 'if not', etc. See examples below.

Examples

if not IndyMsgBoxYesNo('Would you like to proceed?') then

AbortAction('You said no - so we stop')

Else

ShowMessage('Proceeding with the script')

End If

if (IndyMsgBoxYesNo('Would you like to proceed?') = '0') then

AbortAction('You said no - so we stop')

Else

ShowMessage('Proceeding with the script')

End If |