Control Terminal

Declaration

<AMCONTROLTERM SESSION="Text" ACTION="Text [Options]" CURSORROW="Text" CURSORCOL="Text" />

See Also

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

Description

Changes the properties of a currently established terminal session including window visibility or cursor position.

Practical Usage

Used to make the terminal window visible or hidden, or to clear the window or set the cursor position. Commonly used with the Get Terminal Text or Send Terminal Text actions to prepare the terminal window to receive text, or to clear it after text has been retrieved.

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

Action

Text [options], Optional - Default "Show terminal window"
MARKUP: ACTION="SETCURSORPOSITION"

Specifies the action to perform on the terminal window.

Options are:
 

Cursor Row

Text, Required if Set cursor position is selected
MARKUP: ROW="1"

Specifies the row number for the cursor position.

Cursor Column

Text, Required if Set cursor position is selected
MARKUP:  COLUMN="2"

Specifies the column number for the cursor position.

Session Name

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

Specifies the session name. This session name must have been previously created with a 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.

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.

<AMCONTROLTERM SESSION="TermSess2" ACTION="SETCURSORPOSITION" CURSORROW="3" CURSORCOL="5" />