IBM Personal Communications emulator methods

reference australia Updated Sep 10, 2026 8 min read pcomm-terminal-methods.md
Raw file servicenow.com

Use the IBM Personal Communications emulator methods to perform various automation tasks on the IBM Personal Communications emulator.

Screen-level methods

Use screen-level methods to perform the automation tasks on the emulator screen. For example, you can simulate a command on the screen or get text from the screen.

GetFieldText

Returns the text that a field contains after it identifies the field by the row and column number that you specify. The row and column that you specify are the starting point of the field. The method identifies the whole field and then returns the text in the field. In the following example, H is the first letter and the starting point in the field and Host OS : is the complete text in the field.

[Omitted image "terminal-connector-getfieldtext.png"] Alt text: Screen that shows the first letter in the field and the complete text in the field.

[Omitted image "terminal-conn-getfieldtext.png"] Alt text: The GetFieldText method with its parameters.

Parameter Description Data port entry type Data type Default value Mandatory Notes
Row Field row number that identifies the field. Data In Integer NA Yes
Column Field column number that identifies the field. Data In Integer NA Yes
Return Returns the text in the field. Data Out String NA NA

GetTextFromRect

Returns the text in all the fields of a rectangular area that you define on the screen. You define an area by providing the starting and ending rows and column numbers. The method locates and identifies the first and the last fields and returns all the text in all the fields within that area. The following example shows the area that you defined.

[Omitted image "gettextfromrectmethod.png"] Alt text: Area that you defined to show the first cell of the first field and the last cell of the last field.

[Omitted image "terminal-conn-gettextfromrect.png"] Alt text: GetTextFromRect method image.

Parameter Description Data port entry type Data type Default value Mandatory Notes
StartRow Row number that indicates the first character of the first field in the rectangular area. Data In Integer NA Yes
StartCol Column number that contains the first character of the first field in the rectangular area. Data In Integer NA Yes
EndRow Row number that contains the last character of the last field in the rectangular area. Data In Integer NA Yes
EndCol Column number that contains the last character of the last field in the rectangular area. Data In Integer NA Yes
Return Returns the text from all the fields within the rectangular area. Data Out String NA NA

IsCreated

Verifies whether the emulator screen exists based on the screen match rule and can accept inputs from the user. After verification, the method returns the appropriate Boolean value.

[Omitted image "terminal-conn-iscreated.png"] Alt text: IsCreated method.

Parameter

Description

Data port entry type

Data type

Default value

Mandatory

Notes

MatchAllChildren

Option to find the emulator screen by matching the child elements that you have captured.

Data In

Boolean

False

Yes

Warning: Using this option may slow down the method.

Return

Returns the Boolean value depending on whether emulator screen exists based on the screen match rule and can accept inputs from the user.

Data Out

Boolean

NA

NA

 

## SearchText

Returns the numbers of the row and column that holds the first character of the text that you specify. For example, if you specify the string emulator, the method returns the row and column numbers of the starting point of the word emulator which is e.

Note: If you provide the text that spans multiple fields, the Row and Col ports return 0 because the method supports the text only from a single field.

[Omitted image "terminal-conn-search-text.png"] Alt text: SearchText method.

Parameter Description Data port entry type Data type Default value Mandatory Notes
Text Text that the method searches. Data In String NA Yes The text you specify may be case-sensitive depending on the emulator you use.
Row Row number that has the first character of the text you specify. Data Out Integer NA NA If the text that you specify occurs at multiple rows and columns, the method returns the first row and column that contains the text.
Col Column number that has the first character of the text that you specify. Data Out Integer NA NA If the text that you specify occurs at multiple rows and columns, the method returns the first row and column that contains the text.

SendKeys

Simulates the keystrokes that you enter from the keyboard at the mouse device position on the emulator screen. For example, you can simulate the [enter] keystroke on the screen.

[Omitted image "terminal-conn-sendkeys.png"] Alt text: SendKeys method.

Parameter

Description

Data port entry type

Data type

Default value

Mandatory

Notes

Keys

Keystrokes that you enter from your keyboard.

Data In

String

None

Yes

Tip: To learn about the keystrokes, refer the respective terminal emulator documentation.

## SendKeysSecure

Simulates the keystrokes that is a secured string at the mouse device position on the emulator screen.

[Omitted image "terminal-conn-sendkeyssecure.png"] Alt text: SendKeysSecure method.

Parameter

Description

Data port entry type

Data type

Default value

Mandatory

Notes

Keys

Keystrokes that you enter as a secured string.

Data In

Secured String

None

Yes

Tip: To learn about the keystrokes, refer to the respective terminal emulator documentation.

## SetCursorPosition

Attempts to set the mouse device at the row and column number that you specify.

[Omitted image "setcursorposition-method.png"] Alt text: SetCursorPosition method.

Parameter Description Data port entry type Data type Default value Mandatory Notes
Row Option to provide the number of the row based on which the method attempts to set the mouse device on the screen. Data In Integer NA NA The row number must be positive and within the size of the emulator screen. For example, if the screen size is 24X80, the maximum value that you can provide for a row is 24.
Col Option to provide the number of the row based on which the method attempts to set the mouse device on the screen. Data In Integer NA NA The column number must be positive and within the size of the emulator screen. For example, if the screen size is 24X80, the maximum value that you can provide for a column is 80.

WaitForCreate

Waits for the duration that you specify while the connector uses the screen match rule to find whether the screen exists.

[Omitted image "waitforcreate-method.png"] Alt text: WaitForCreate method.

Parameter

Description

Data port entry type

Data type

Default value

Mandatory

Notes

timeoutinSeconds

Option to provide the number of seconds for which the method waits while the connector uses the screen match rule to find if the screen exists.

Data In

Integer

30

Yes

 

MatchAllChildren

Option to match all screen elements that you had captured to find if the screen exists.

Data In

Boolean

False

Yes

Warning: Using this option may delay the execution of the method.

Return

Returns the Boolean value based on whether the emulator screen was found.

Data Out

Boolean

NA

NA

 

## Element-level methods

Element-level methods perform automation tasks on the emulator screen elements that you add from the Terminal Connector screen. You can add a screen element as a field or a table.

GetAsTable

Returns the text that you captured as a data table object. Use this method when you capture the data from a screen as a table. However, you can also use the method for the data that you capture as a field. To learn how to capture the data as a table, see Configure the IBM Personal Communications emulator.

[Omitted image "GetAsTable-element-method.png"] Alt text: GetAsTable method.

Parameter Description Data port entry type Data type Default value Mandatory Notes
Return Returns the captured text from the terminal screen as a data table object. Data Out Data Table NA NA To view the table, right-click the parameter and select Preview Data.

GetText

Returns the text in the field that you captured from the emulator screen. If you use this method for a table that you captured, it returns the text in the first field of the rectangle.

[Omitted image "gettext-element-method.png"] Alt text: GetText method.

Parameter Description Data port entry type Data type Default value Mandatory? Notes
Return Returns the text from the captured field. Data Out String NA NA

IsCreated

Matches the rules and verifies whether the captured element exists.

[Omitted image "iscreated-element-method.png"] Alt text: IsCreated method.

Parameter Description Data port entry type Data type Default value Mandatory Notes
Return Returns the Boolean value based on whether the element is active. Data Out Boolean NA NA

SetText

Attempts to set the text to the field.

[Omitted image "settext-element-method.png"] Alt text: SetText method.

Parameter Description Data port entry type Data type Default value Mandatory Notes
Text Option to specify the text that the method attempts to set in the field. Data In String NA Yes You can't use this method on protected emulator screens.

WaitForCreate

Waits for the duration that you specify while the connector uses the match rule to find whether the element exists.

[Omitted image "waitforcreate-element-method.png"] Alt text: WaitForCreate method.

Parameter Description Data port entry type Data type Default value Mandatory Notes
timeoutinSeconds Option to provide the number of seconds for which the method waits while the connector uses the match rule to find whether the element exists. Data In Integer 30 Yes
Return Returns the Boolean value depending on whether the element was found. Data Out Boolean NA NA

Parent Topic:Terminal connector methods

Search documentation
Search document titles and file paths on the australia branch