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.

 

Edit Controls 

Edit controls are used to display an input field (a box into which the script user can type data). As scriptwriter, you establish the length of the input field and it cannot be changed by the script user. You also define the type of data which can be input by the script user into an edit control field. The types of data which can be input by the script user are listed below. These same ControlTypes are used with the Listboxes.

Control type

Description

Text 

Accepts text and numbers which will require no arithmetic. Also accepts special Res-related characters (such as the end item).

Note: The keyboard is remapped as it is in Res Manager. This type is commonly used when the scriptwriter requires host data to be input.

ANSI  (American National Standards Institute)

 

Accepts alphanumeric characters (up to 4082) with standard Windows keyboard mapping.

Note: The keyboard is not remapped as it is in Res Manager. The characters input are those reflected on the normal Windows keyboard. This input type is commonly used with File I/O and Mail Commands, as characters such as the backslash (\) in DOS commands can be input.

Number   

Accepts only the numbers 0 - 9, minus sign, or decimal point.

Note: The minus sign is only valid as the first character.

Multi

 

Same as Edit ANSI, except it can be multi-line and text automatically wraps or <Ctrl + Enter> can be used to create an end-of-line.

Creating an Edit control and associated attributes

  1. Right-click anywhere in the background of the dialog box.

  2. Select Edit. A new control is added.

  3. Adjust the colors and text in the Appearance section. The default color for a Edit box is background white and the font color black. Use the Text box to provide a default value of the variable.

  4. Specify the ControlType in the Behavior section. You can place the following three limitations on each of the input fields. Enter a VariableName to be used in your script code.

    Criteria

    Description

    Must-fill

    This field can be left blank, but if an entry is made, it must completely fill the input field.

    Note: Must-fill can be used in conjunction with Must-enter so that an entry is required and it must completely fill the field.

    Must-enter

    This field cannot be left blank.

    Notes:

    • Must-enter cannot be selected when a condition is present.
    • Must-enter can be used in conjunction with Must-fill so that an entry is required and it must completely fill the field.

    Condition

    • If the condition you establish is met, the cursor is allowed in the control and data can be entered.
    • If the condition you establish is not met, the cursor is not allowed in the control and data cannot be entered.

    Example:  ((itin_i=="")AND(itin_ii==""))

    If the value of the variable itin_i is null AND the value of the variable itin_ii is null, then data can be entered in the control.

    Note: A condition cannot be used if Must-enter has been selected.

    Note: See the table in the ListBox control section that describes each of the ControlTypes.

  5. Adjust the location and size in the Layout section.

Edit Date Controls

Edit date controls are used to display an input field (a box into which the script user can type dates). As scriptwriter, you establish the date format. There are four date formats which can be input by the script user and the format will be added as a watermark in the edit control.

Creating an Edit Date control and associated attributes

  1. Right click anywhere in the background of the dialog box.

  2. Select Edit Date. A new control is added.

    Note: The default date format is airdate and a calendar icon is displayed. The colors and text in the Appearance section default and should not be changed.

  3. The colors and text in the Appearance section default and should not be changed.

  4. Use the option Date Format in the Behavior section to set the edit date format. You can place the same three limitations on each of the input fields as used with a regular Edit field. Enter a VariableName to be used in your script code.

  5. Check ShowCalendar to display a calendar icon in the input box. Adjust the width of the input field to handle the format selected.

A Calendar will be displayed and a the user can click to find the correct month.