Message Box Action Icon

Message Box Action

Declaration

<AMMESSAGEBOX WINDOWTITLE="text" BUTTONS="text [options]" POSITION="text [options]" XPOS="number" YPOS="number" DEFAULTBUTTON=number ONFIRSTBUTTONCLICK="text [options]" ONFIRSTBUTTONCLICKTASK="text" ONSECONDBUTTONCLICK="text [options]" ONSECONDBUTTONCLICKTASK="text" ONTHIRDBUTTONCLICK="text [options]" ONTHIRDBUTTONCLICKTASK="text" ICON="text [option]" WINDOWINFRONT="yes/no" RESULTVARIABLE="text" MODAL="yes/no" COUNTDOWNDELAY="number">text</AMMESSAGEBOX>

See Also

Input Box, Choice, Common Dialog

Description

Displays a message box using the options you specify. A message box is useful when notification and/or user input is required in a task.

Practical Usage

Message boxes are used to provide informative feedback to the user, or, alternatively, to ask the user a question which requires a "yes, no" or "ok, cancel" type answer.

Parameters

General Tab

Message Text
Text, required
MARKUP: MESSAGETEXT="The contents of the variable is %VARNAME%"

Specifies the text to be displayed in the message box.

Window Title
Text, optional Default (blank)
MARKUP: WINDOWTITLE="QUESTION"

Specifies the title of the message box dialog.

Buttons Tab

Buttons
Text [options], Optional - Default "ok"
MARKUP: BUTTONS="yes_no"

Specifies the button or array of buttons that should be displayed on the message box.

The Available Options Are:

ok: The message box will contain an OK button only.

ok_cancel: The message box will contain an OK and CANCEL button.

retry_cancel: The message box will contain a RETRY and CANCEL button.

yes_no: The message box will contain a YES and NO button.

yes_no_cancel: The message box will contain a YES, NO, and CANCEL button.

abort_retry_ignore: The message box will contain a YES, NO, and CANCEL button.

Default Button
Number, Optional - Default 0
MARKUP: DEFAULTBUTTON=2

Specifies number of the button (from left to right) that should be focused by default. The number specified must be the same as or lower than the total number of buttons on the message box.

On First Button Click
text [options], Optional - Default "continue"
MARKUP: ONFIRSTBUTTONCLICK="stop"

Specifies the action that should take place when the first (from left to right) button is clicked.

The available options are:

continue: When the button is pressed, the step will allow the task to continue.

stop: When the button is pressed, the step will stop the task.

fail: When the button is pressed, the step will fail.

start_task: When the button is pressed, the another task will be started. The task to be started is specified in the ONFIRSTBUTTONCLICKTASK= parameter.

On First Button Click Task to Run
text, Optional - Default (none)
MARKUP: ONFIRSTBUTTONCLICKTASK="c:\foldername\taskname.aml"

Specifies the task that should be run when the button is clicked. Valid only if ONFIRSTBUTTONCLICK="start_task".

On Second Button Click
text [options], Optional - Default "continue"
MARKUP: ONSECONDBUTTONCLICK="stop"

Specifies the action that should take place when the second (from left to right) button is clicked.

The available options are:

continue: When the button is pressed, the step will allow the task to continue.

stop: When the button is pressed, the step will stop the task.

fail: When the button is pressed, the step will fail.

start_task: When the button is pressed, the another task will be started. The task to be started is specified in the ONSECONDBUTTONCLICKTASK= parameter.

On Second Button Click Task to Run
text, Optional - Default (none)
MARKUP: ONSECONDBUTTONCLICKTASK="c:\foldername\taskname.aml"

Specifies the task that should be run when the button is clicked. Valid only if ONSECONDBUTTONCLICK="start_task".

On Third Button Click
text [options], Optional - Default "continue"
MARKUP: ONTHIRDBUTTONCLICK="stop"

Specifies the action that should take place when the third (from left to right) button is clicked.

The available options are:

continue: When the button is pressed, the step will allow the task to continue.

stop: When the button is pressed, the step will stop the task.

fail: When the button is pressed, the step will fail.

start_task: When the button is pressed, the another task will be started. The task to be started is specified in the ONTHIRDBUTTONCLICKTASK= parameter.

On Third Button Click Task to Run
text, Optional - Default (none)
MARKUP: ONTHIRDBUTTONCLICKTASK="c:\foldername\taskname.aml"

Specifies the task that should be run when the button is clicked. Valid only if ONTHIRDBUTTONCLICK="start_task".

Advanced Tab

Position
Text [options], Optional - Default "center"
MARKUP: POSITION="upper_left"

Specifies the button or array of buttons that should be displayed on the message box.

The Available Options Are:

upper_left: The message box will be displayed at the upper left of the screen.

center: The message box will be displayed at the center of the screen (default).

lower_left: The message box will be displayed at the lower left of the screen.

upper_right: The message box will be displayed at the upper right of the screen.

lower_right: The message box will be displayed at the lower right of the screen.

custom: The message box will be displayed at the pixel coordinates specified at XPOS= and YPOS=.

X Pos
Number, Optional - Default 0
MARKUP: XPOS="55"

Specifies the X (horizontal) coordinates of the position that the message box dialog should be displayed on the screen. This option is only valid if POSITION="custom", otherwise it is ignored.

Y Pos
Number, Optional - Default 0
MARKUP: YPOS="55"

Specifies the Y (vertical) coordinates of the position that the message box dialog should be displayed on the screen. This option is only valid if POSITION="custom", otherwise it is ignored.

Icon
text [options], Optional - Default "none"
MARKUP: ICON="stop"

Specifies the icon that should be displayed on the messagebox next to the icon. The icon helps to determine what type of message is being displayed.

The available options are:

none: No icon is displayed (default)

information: The standard Windows information icon is displayed.

question: The standard Windows question icon is displayed.

stop: The standard Windows stop icon is displayed.

Modal
yes/no, Optional - YES
MARKUP: MODAL="no"

Specifies whether the dialog should be displayed "modal" (the message box must be cleared before the task moves on) or "modeless" the task moves on immediately.

Variable Name (for Return Code)
text, Optional - Default (none)
MARKUP: RESULTVARIABLE="varname"

Specifies the name of an already created variable that should be populated with the number of the button (from left to right) that has been clicked. This option is valid only if MODAL=yes.

Countdown Delay
number, Optional - Default 0
MARKUP: COUNTDOWNDELAY="0"

Specifies the amount seconds that should elapse before the message box clears itself. If the value is 0, the message box is displayed indefinitely.

Notes

Standard Error Handling Options
This action also includes the standard "Error Causes" and "On Error" failure handling options/tabs

More on Error Handling Options

Variables and Expressions
All text fields allow the use of expressions by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, a popup expression builder is available in all these fields by pressing F2.
More on variables...
More on expressions...
More on the expression builder...

Example

<AMMESSAGEBOX WINDOWTITLE="Question" ICON="question" COUNTDOWNDELAY="10">Would you like to continue?</AMMESSAGEBOX>