MsgBox

Description:

baMsgBox displays a system MessageBox.

Platforms:

Windows and Macintosh

Usage:

Result = baMsgBox( Message, Caption, Buttons, Icon, DefaultButton )

Arguments:

String, string, string, string, integer.
Message is the message to display. This can contain more than one line.
Caption is the caption to show in the Title bar.
Buttons is the type of buttons to display. This can be one of the following:
   "OK"
   "OKCancel"
   "RetryCancel"
   "AbortRetryIgnore"
   "YesNo"
   "YesNoCancel"
Icon is the type of icon to display. This can be one of the following:
   "Stop"
   "Information"
   "Question"
   "Exclamation"
   "NoIcon"
DefaultButton is the number of the default (selected) button. Can be 1, 2, or 3 depending on the number of buttons. The button on the left hand side is 1.

Returns:

String.
Returns the name of the button clicked eg "OK" or "Ignore".

Examples:

Director:
Answer = baMsgBox( "Is this is a test message?", "A question" , "YesNo", "Question" , 1 )
if Answer = "Yes" then baMsgBox("Correct!" , "The answer", "OK", "Information", 1)

Authorware:
Answer := baMsgBox( "Is this is a test message?", "A question" , "YesNo", "Question" , 1 )
if Answer = "Yes" then baMsgBox("Correct!" , "The answer", "OK", "Information", 1)
 

Notes:

On Macintosh, you can use alternative icon names "Note" instead of "Information"; "Caution" instead of "Exclamation".

On Macintosh, if the Caption argument is empty, then a nonmovable message box will be used.

See also:

MsgBoxEx
baMsgBoxButtons
baTaskDialog