String() action

Enters text on the terminal, as if typed on the keyboard.

Parameters

 * -subst
 * If provided as the first parameter, variable substitution will be performed on the string. New in 4.1


 * string
 * Text to add. The text can include string escape sequences.

Escape sequences

 * 0
 * 1
 * 2
 * 3
 * 4
 * 5
 * 6
 * 7
 * A string of octal digits specify a Unicode character. In 3270 mode, that character will be converted to EBCDIC using the host code page before being inserted at the current cursor position.


 * b
 * Invokes the Left action.


 * Causes one backslash (\) character to be entered literally.
 * Causes one backslash (\) character to be entered literally.


 * e
 * Allows an 8-bit EBCDIC code to be entered at the terminal. The two characters following the  must be hexadecimal values. This is normally used to ensure that a specific EBCDIC code is inserted, as opposed to plain text, which is translated from the local workstation's locale to EBCDIC depending on the host code page.


 * f
 * Invokes the Clear action.


 * n
 * Invokes the Enter action.


 * pa
 * Invokes the PA action, with the character after  as a parameter.


 * pf
 * Invokes the PF action, with the one or two numeric characters after  as a parameter.


 * r
 * Invokes the Newline action.


 * t
 * Invokes the Tab action.


 * T
 * Invokes the BackTab action.


 * u
 * Allows the entry of a hexadecimal-encoded Unicode code point. Up to 4 hexadecimal digits will be read after the . In 3270 mode, that character will be converted to EBCDIC using the host code page before being added at the current cursor position.


 * x
 * An alias for \u.

Variable substitution
New in 4.1

If the -subst option is given, environment variables will be substituted in the string. These use bash syntax, e.g., ${USER} will be substituted with the value of the USER environment variable.

Examples
Add the string. String(foo) Add the string, tab to the next field, add the string  , and send an Enter AID. String("username\tpassword\n") Enter the string. String("st\141r") Enter the string. String("fuzzy\\bear") Enter the string. String("st\e81r") Send a PA2 AID to the host, then type  and send an ENTER AID. String("\pa2foo\n") Send a PF1 AID to the host, then type  and send an ENTER AID. String("\pf1foo\n") Send a PF21 AID to the host, then type. String("\pf21foo") Send a PF2 AID to the host, then type. Note the use of a leading zero to prevent the second 2 from being interpreted as part of the escape sequence. String("\pf0223skidoo") Enter the string. String("st\u0061r") Add a string, substituting the USER environment variable: New in 4.1 String(-subst,"login ${USER}\n")