|
ScriptPro Editor This topic is for use by scriptwriters who are using ScriptPro Editor to create custom scripts for their agencies. Agents can go to Using ScriptPro Scripts for more information about using custom or standard scripts within Travelport Smartpoint. |
Commands
Commands on this page:
- Flow control
- String operations
- Time functions
- Date functions
- Mathematical operations
- Window operations
Flow Control commands
|
Command |
Description |
|---|---|
|
BEGIN |
Denotes the beginning of the code portion of a script |
|
CALL |
Transfers program control to another script, then returns control to the main (parent) script |
|
CASE / ENDCASE |
Can be used in place of multiple IF commands. Used when a variable may be equivalent to one of a list of literal values. |
|
CHAIN |
Transfers program control to another script, and does not return control to the main (parent) script.
|
|
END |
Denotes the end of the code portion of a script. |
|
ENDS |
Marks the end of a script; the script is terminated. |
|
FOR / ENDFOR |
Performs a statement or group of statements FOR a specific number of times. |
|
GOSUB |
Transfers program control to a subroutine within the current script. |
|
GOTO |
Transfers program control to a designated spot in a script which is called a paragraph. A colon ( : ) preceded the paragraph name. |
|
IF / THEN / ELSE / ENDIF |
Compares two values to see if they are the same. Based on the end result, which must be either true or false, it determines if a statement or group of statements are to be executed. |
|
REPEAT / UNTIL |
Executes a loop on a statement or group of statements UNTIL the condition or expression is true. Runs through the loop at least once. |
|
WHILE / DO |
Executes a loop on a statement or group of statements as long as a given condition or expression is true. |
String operations
|
Command |
Description |
|---|---|
|
COMPARE |
Compares two strings to see if they are the same. A return code of positive 1 will be assigned if strings are the same. |
|
CONCAT |
Method that links a variable (x) with another variable or string (y) by adding them together and replacing the value of x with (x + y). Note: Another method used to link one or more variables or strings to create a new variable is the Add mathematical format (z = x + y). See Mathematical Format. |
|
INSTR |
Searches for the occurrence of specified character(s) in a string or variable. See Variables. |
|
READ_SCREEN |
Captures characters from the host screen by row and column coordinates, number of characters, and a given variable name. |
|
SCREEN_SEARCH |
Searches the host screen for specified string and assigns screen coordinates to those items. |
|
STRLEN |
Determines the length of a specified string. |
|
SUBSTR |
Creates a new variable from a portion of a variable that already exists. See Variables. |
Time functions
|
Command |
Description |
|---|---|
|
TIME_12 |
Creates a string variable from the current PC time in the 12-hour format. |
|
TIME_24 |
Creates a string variable from the current PC time in the 24-hour format. |
Date functions
|
Command |
Description |
|---|---|
|
AIRDATE2STRING |
Converts an airdate ( ‘DDMMM’ ) to a string variable. |
|
CHGDATE |
Adds days to or subtracts days from a date. |
|
DATE2STRING |
Converts a date ( ‘00/00/00’ ) to a string variable. |
|
DATE2STRINGFORMAT |
Converts a date to a string with a specified date format. |
|
GETDATE |
Creates separate variables for Month, Day and Year from a date variable/value. |
|
SETDATE |
Creates a date from given month, date and year variables or parameters. |
|
STRING2AIRDATE |
Converts a string to the airdate ( ‘DDMMM’ ) format. |
|
STRING2DATE |
Converts a string to the date ( ‘00/00/00’ ) format. |
|
STRING2DATEFORMAT |
Converts a string to a specific date format. |
|
TODAY |
Creates a date variable from the current system date. |
Mathematical operations
|
Command |
Description |
|---|---|
|
ADD |
Use the + character. Add numbers and/or number variables. |
|
DIVIDE |
Use the / character. Divide numbers and/or number variables. |
|
FORMAT |
Converts a number variable’s value into a string and creates a string variable. |
|
MAKENUM |
Converts a string of numeric characters into their equivalent number and creates a number variable. |
|
MULTIPLY |
Use the * character. Multiply numbers and/or number variables. |
|
SUBTRACT |
Use the - character. Subtract numbers and/or number variables. |
Window operations
|
Command |
Description |
|---|---|
|
ABORT |
Creates an ABORT Dialog Box with user-defined text that will terminate the script once displayed. |
|
ALERT
|
Creates Dialog Boxes with user-defined text. The text will be centered in the Dialog Boxes. |
|
ERASE_ALL |
Clears Res data from all opened and minimized Res screens. Equivalent to the <F4> function key. |
|
ERASE_SCRN |
Clears Res data from the active Res screen. |
|
ERASE_SCRN ( ) |
Clears Res data from the specified Res screen. |
|
JUMP_CURSOR ( ) |
Moves the cursor from the current Res screen to the specified Res screen without sending information to the host. |
|
MESSAGE |
Creates a Dialog Box with user-defined text. Also includes pre-defined buttons, three possible warning icons, and Dialog Box title. |
|
NEXT |
Moves the cursor focus to the next open window. The opposite of the PREV command. |
|
PAUSE |
Temporarily halts a script's execution. Host formats can be entered independently from the script. |
|
PREV |
Moves the cursor focus to the previous open window. The opposite of the NEXT command. |
|
SEND |
Writes strings and/or string variable to the host Res screen, as if they were being entered from the keyboard. |
|
SEND_INS |
Works the same as the SEND commands, but places data on the Res screen in the Insert mode. |
|
WIN_CLOSE |
Closes the Res window with cursor focus. |
|
WIN_CLOSE ( ) |
Closes the specified Res window, even if minimized. |
|
WIN_CLOSEALL |
Closes all Res windows, including minimized Res windows. |
|
WIN_MAX |
Maximizes all currently open Res windows. |
|
WIN_MAX ( ) |
Maximizes the specified Res window. |
|
WIN_MIN |
Minimizes the Res window with cursor focus. |
|
WIN_MIN ( ) |
Minimizes the specified Res window. |
|
WIN_NUM |
Determines the number of active Res windows. |
|
WIN_OPEN ( ) |
Opens a new or specified Res window with a window title, if desired. |
|
WIN_RESTORE |
Restores to default size a minimized or maximized window with cursor focus. |
|
WIN_RESTORE ( ) |
Restores to default size the specified minimized or maximized window. |
|
WINDOW ( ) |
Determines the current active Res window. |
|
XMIT |
Transmits information in the SEND command to the host. |
|
XMIT ( ) |
Transmits information in the SEND command to the host, in the specified reservations window. |
|
XMITNEXT |
Sends host response and cursor to the next window if opened or opens a new window to receive the host response and cursor. |
|
XMITPREV |
Sends host response and cursor to the previous window if opened or opens a new window to receive the host response and cursor. |