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.

 

Create a New Script

When you first access the ScriptPro Editor, a blank area for creating scripts is provided (ScriptPro Editor Window).  At any time after accessing the ScriptPro Editor, select the File menu then New then File to open a blank area for script creation. 

Script template dialog

From the File menu, select Preferences. On this dialog, you have the option to Launch New Template at File New. If selected, a popup box displays when creating a new script file. This box allows you to enter the script title, a brief description of the script, and the author's name.  It also inserts a script template (skeleton) containing mandatory script components.

The Script Template feature is extremely helpful when creating new scripts. Use of this feature is not mandatory, as scripts can often be created by copying and pasting from existing scripts. Access the Script Template prior to typing anything in a new script. The template is only accessible to new, untitled scripts.

Below is an example of information that could be entered in each field numbered in the Script Template dialog shown above.

Number

Field

Example Text

1

Script Name

Z4BookAir

2

Description

This script is used to assist in the booking of flights from availability.

Note:  Please remember that your descriptions should be specific.  The description above is much more appropriate than a statement like: "This is an air script."

3

Author

VLBOYD

When the example text above is entered in the Script Template dialog box, the script template below is the result.

 

The table below describes the Script Editor elements.

Number

Element

Description

1

Script Name on Tab

 

2

Script Title 

  • Titles should be limited to 32 characters
  • No spaces allowed
  • Underscores may be used for separation of words (e.g., AIR_AVAILABILITY)
  • Upper and/or lower case can be used; script titles are not case sensitive

Note:  The word "SCRIPT," followed by a space, must appear before the script title.  The insert template dialog inserts this for you.

3

Script Description

 

This area includes the script description, the scriptwriter's name, and the date the script was created (using the Insert Template, if applicable).  This area is freeform and may be revised at any time.

Note:  The date is programmatically inserted.

4

VARIABLES

 

In this section, the variables within the script are declared and initial values are assigned.

  • Text fields are transferred to this area in quotes ("","text")
  • Number fields are transferred as zero; however, if a default value is entered in the Dialog Box, the value appears as the number value.
  • Dates are transferred in single quotes: e.g., airdate = '00XXX', date = '00/00/00'

Note:  Do not use reserved words for variables.  Reserved words include command names, words used in the script skeleton and internal variables.  Reserved words are treated by the system as commands. 

5

RET_CODE=0

Return Code is a system variable, used by Dialog Manager and ScriptPro Runtime.

Note:  The Return Code is mandatory and should never be deleted!

6

ROUTINES

Subroutines used in the script are defined here.  Subroutines are used for repetitive processes and are invoked using the GOSUB/RETURN command.

Note:  Subroutines are segments of code that may be used several times within the script.

7

BEGIN/END

Marks the logical beginning and end of the code section of the script or subroutine.

8

ENDS

Marks the logical end of the script.  Anything entered by the user after this statement is ignored.

9

Footer

Line and Column are shown to coordinate with the location of the cursor.