Softdial Scripter™
Designer - Subscripts Tutorial
5) Creating a Screen
To create the Show Result screen:
- From the menu select Script > New Screen and enter the name Show Result (Fig. 1).
Fig. 1 - Example New Screen
- Click OK.
The Screen Designer window opens.
Designing the screen - validating user input
In Screen Designer:
- Drag a Label onto the Screen window, and in the Properties window (right), set the following:
- Name - lblPrompt (Fig. 2).
Fig. 2 - Example Label Prompt
- Drag a Validation Textbox onto the Screen window, and set the following (as Fig. 3):
- CompletionRegex - select Decimal numbers,
- Name - type tbUserResult,
- PreviewRegex - type [0-9]+,
Fig. 3 - Example Validation Textbox
Although the CompletionRegex setting allows decimal numbers to be entered, setting the PreviewRegex field as shown will only allow integer values to be entered by the user.
- Drag a Button onto the Screen window, and set the following (as Fig. 4):
- ButtonAction - leave set to Outcome,
- ButtonOutcome - type OK,
- Content - type OK,
- IsEnabled - uncheck,
- Validate - check.
Fig. 4 - Example Button
Unchecking IsEnabled and checking Validate means that the OK button will only be enabled when a valid value is entered into the Validation Textbox. If more than one validation control was present on the screen, the OK button would only be enabled if all validation controls contained valid input.
- Exit the Screen Designer, saving your changes.
Next: 6) Editing MySubscriptSubscript (2)