Input Box Action Icon

Input Box Action

Declaration

<AMINPUTBOX MESSAGETEXT="text" RESULTVARIABLE="text" WINDOWTITLE="text" POSITION="text [options]" XPOS="number" YPOS="number" DEFAULTBUTTON="number" ICON="text [option]" WINDOWINFRONT="yes/no" COUNTDOWNDELAY="number">

See Also

Message Box, Create Variable, Choice

Description

Displays an input box allowing the user to enter a value. The value entered is saved to the variable specified. Task execution is paused while the task waits for a value to be entered. Useful for asking a question that requires a text response at runtime.

Practical Usage

Similar to the Message Box <AMMESSAGEBOX> action except allows the user to enter a text value in response to a question. The text value is populated into a variable.

Parameters

General Tab

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

Specifies the text to be displayed in the input box. Usually this is the question that the user should input the answer to.

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

Specifies the title of the message box dialog.

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

Specifies the name of an already created variable that should be populated with the text that the user has input as a response to the question.

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 input box 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.

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

Specifies number of the button (from left to right) that should be focused by default. 1 Is OK, 2 is CANCEL.

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

Specifies the amount seconds that should elapse before the input 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

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