Get Terminal Text
<AMGETTERMTEXT SESSION="Text" RESULTVARIABLE="Text" ACTION="Text" LINE="Text" BEGINROW="Text" BEGINCOL="Text" ENDROW="Text" ENDCOL="Text" />
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 in the background without the use of 3rd party software.
Specifies the location from which to get the text.
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
Specifies the line number. Active only if Specific line is selected.
Specifies the beginning row of the range. Active only if Range is selected.
Specifies the beginning (left) column of the range. Active only if Range is selected.
Specifies the ending row of the range. Active only if Range is selected.
Specifies the ending (right) column of the range. Active only if Range is selected.
Specifies the variable in which to place the retrieved text.
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.
This action includes the Description tab for entering a custom step description.
More on setting custom step description
This action also includes the standard Error Causes and On Error failure handling options/tabs.
More on Error Handling Options
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
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" />