Get Terminal Text

Declaration

<AMGETTERMTEXT SESSION="Text" RESULTVARIABLE="Text" ACTION="Text" LINE="Text" BEGINROW="Text" BEGINCOL="Text" ENDROW="Text" ENDCOL="Text" />

See Also

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

Description

Returns the text from an established Terminal session. The text returned can be the entire screen, the current line, a specified line, or a specified range.

Practical Usage

Used to get text from an existing terminal session that was previously created by a Connect Terminal step. 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

Text to Get

Text [options], Optional - Default "Entire screen"
MARKUP:  ACTION="CURRENTLINE"

Specifies the location from which to get the text.

Options are:
 

Line

Text, Required if active
MARKUP: LINE="4"

Specifies the line number. Active only if Specific line is selected.

Beginning Row

Text, Required if active
MARKUP: BEGINROW="01"

Specifies the beginning row of the range. Active only if Range is selected.

Beginning Column

Text, Required if active
MARKUP: BEGINCOL="1"

Specifies the beginning (left) column of the range. Active only if Range is selected.

Ending Row

Text, Required if active
MARKUP: ENDROW="24"

Specifies the ending row of the range. Active only if Range is selected.

Ending Column

Text, Required if active
MARKUP: ENDCOL="20"

Specifies the ending (right) column of the range. Active only if Range is selected.

Place Buffer into Variable

Text [variable name], Required
MARKUP: RESULTVARIABLE="VariableName"

Specifies the variable in which to place the retrieved text.

Session Name

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

Specifies the session name from which to get the text. 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.

<AMGETTERMTEXT SESSION="TermSess2" RESULTVARIABLE="VariableName" ACTION="RANGE" BEGINROW="01" BEGINCOL="1" ENDROW="24" ENDCOL="20" />