MESSAGE

Create a dialog box which displays a message string and prompts the user for input.

Syntax

MESSAGE [/CAPTION="header"] "string"

Parameters

/CAPTION="header"

Specifies the text in the title bar of the dialog box. The default value is "message".

string

The message string to be displayed.

Description

This command is mainly used within batchfiles. The MESSAGE command creates a new dialog box which displays the message string. The dialog box is displayed as a pop-up window and must be closed by clicking the Yes or No buttons.

This command is especially useful in batch files for writing information or diagnostic messages to the screen. It can also provide options and operate conditionally on the result.

The result of the last message box shown is saved in a debugger variable @MSGBOXRESULT. If you clicked YES, @MSGBOXRESULT will equal 1, otherwise the value will be 0.

Example

! Example batch file message.xdb
MESSAGE /CAPTION=”Exit?” "Would you like to exit?”
if @MSGBOXRESULT == 1 then exit; end

See Also

Optimization Notice: 
For more complete information about compiler optimizations, see our Optimization Notice.