Smart Buttons
Controls/XML Elements

Get Text From Terminal <GetString>

This element captures text from the Smartpoint terminal window. You can either:

  • Read text from a specific column and row.

  • Use a regular expression (regex).

Configuring

It is recommended to configure using the Get Text from Terminal Editor.

To configure with the Get Text from Terminal Editor:
  1. Open the Smart Buttons Editor to create a script.

  2. Click Get Text from Terminal <GetString> .

  3. Configure the attributes.

    Attribute

    Description

    Variable name Enter the name of variable to store the content read from the terminal window.
    Column Enter the column to read.
    Row

    Enter the row to read.

    Length Insert the length of the terminal text that you want the script to read. For example, enter 7 if you want to read seven characters.
    Search row by content

    If the value you want to capture is not always in the same row, you search for the value in a row that contains a specific expression. For example, Grand Total may be in different row depending on number of passengers; however, Grand Total can always be found in a row containing the expression: GRAND TOTAL INCLUDING TAXES ****).

    Regular expression searchs

    Select regular expression (regex) functionality, commonly used in programing languages, to define exactly the place that you want to capture data on the screen.

    For more information about building a regex line, see https://regex101.com/.

    More Information

    • First match only
      A standard regex reurns all elements that match the regex pattern. When First match only is selected, regex returns only the first element that matches the regex pattern.

    • Single line match
      Select to match the expression where the . (dot) matches every character, including a new line character. If regex does not contain the dot (.) metacharacter, the modifier has no impact.

  4. Click SUBMIT.