Wait Terminal Action

Declaration

<AMWAITFORTERMTEXT SESSION="Text" TIMEOUT="Number" MEASURE="Text [options]"  USECASE="yes/no" USERE="yes/no" TYPE="Text [options]" FOUNDTEXTVARIABLE="Text" ROW="Text" COLUMN="Text"</AMWAITFORTERMTEXT>

See Also

Wait Terminal Action-Setting Properties Connect Terminal, Disconnect Terminal, Send Terminal Text, Get Terminal Text, Control Terminal

Description

Causes task execution to pause at the current line until the specified condition exists at the terminal.

Practical Usage

Commonly used to wait for a condition that indicates the terminal is ready for the next step of the task. Waits for text, a blank screen, a default prompt, or a cursor position to exist in a terminal session. If the condition is met, the task continues. Otherwise it fails.

The terminal actions are used in lieu of terminal emulation software. Using the terminal actions, legacy systems can be automated in the background without the use of 3rd party software.

Parameters

General Tab

Wait for

Text [options], Optional - Default "Text to appear"
MARKUP: TYPE="BLANKSCREEN"

Specifies the condition to wait for.

Options are:
 

Text

Text , Required if Text to appear or Text to disappear is selected
MARKUP: >Text to search for

Specifies the text that is to appear or disappear. Only valid if Text to appear or Text to disappear is the selected Wait for option.

Regular expression

Yes/No, Optional - default "no"
MARKUP: USERE="YES"

Specifies whether the Text parameter is a regular expression. If the option is no, the Text parameter contains literal text, if the option is yes, the Text parameter contains a regular expression.

Cursor row

Text, Required if Cursor move to or Cursor move out of is selected
MARKUP: ROW="1"

Specifies the row number for the cursor position.

Cursor column

Text, Required if Cursor move to or Cursor move out of is selected
MARKUP:  COLUMN="2"

Specifies the column number for the cursor position.

Timeout

Number, optional - default 5000 milliseconds
MARKUP: TIMEOUT="5" MEASURE="seconds"

Specifies the number of milliseconds, seconds, minutes, or hours to wait before failing the step.

Session name

Text, Optional - Default "TermSess1"
MARKUP: SESSION="TermSess2"

Specifies the session name. This session name must have been previously created with a prior Connect Terminal step. This allows several connections to be active simultaneously. If you are only using one connection at a time, do not specify a value other than the default.

Advanced tab

Populate variable with found text

Text [variable name], Optional
MARKUP: FOUNDTEXTVARIABLE="VariableName"

Specifies an already created variable in which to place the found text. Valid only if Text to appear or Screen to contain text is selected.

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

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, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMWAITFORTERMTEXT SESSION="TermSess2" TIMEOUT="500" FOUNDTEXTVARIABLE="TextVariable" TYPE="TEXT">Process complete</AMWAITFORTERMTEXT>