Get Terminal Text

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. 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 Workflow in the background without the use of 3rd party software.

Declaration

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

Example

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

General Tab Parameters

Text to get: Specifies the location from which to get the text. The required parameters change depending on which option you choose:

  • Current line: retrieves the line from the current cursor position

  • Entire screen: retrieves the full displayed screen

  • Specific line: retrieves a specified line

  • Range: retrieves a range specified by Beginning row, Beginning column, Ending row, and Ending column

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

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

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

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

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

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

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

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

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

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

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

Place buffer into variable: Specifies the variable in which to place the retrieved text.

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

Session name: 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.

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