WiseScript Package Editor Reference 228
Creating Custom Dialog Boxes
Events are generated as the end user works with the dialog box on the destination
computer. Built-in dialog box events include first-time display of the dialog box (INIT),
updating of information displayed on the dialog box (UPDATE), and verification of the
validity of the contents of the dialog box (VERIFY). Additional events, whose names you
define, can be generated by marking the Execute Named Event option on the settings
dialog box of push button or hot text controls.
To handle the generated events, you create a conditional structure in the dialog box
script that tests the variable DLG_EVENT_TYPE for the appropriate value. (Example: If
DLG_EVENT_TYPE is equal to INIT, the INIT event is being called.) The script actions
between the If statement that tests for this value and the End statement that goes with
it should handle that event. The script can handle multiple events in different ways by
including multiple conditional blocks, one after the other.
To create a custom dialog box script
Note
Before you write a custom dialog box script, review the introductory material in About
Script Editor on page 94. Also see Conditions and Loops on page 109 and Variables and
Expressions on page 110.
1. Open the dialog box in the Custom Dialog Editor.
See Editing Dialog Boxes on page 203.
2. Select View menu > Dialog Script Editor.
The Dialog Script Editor opens.
3. Create the script as you would in Script Editor.
The sample scripts Event Handler.wse and License Agreement.wse use scripting to
handle mouse events. For details on sample scripts, see ScriptHelp.htm in the Samples
subdirectory of this product’s installation directory.
Dialog Box Script Actions
The script actions available in the Dialog Script Editor are a subset of the actions in
Script Editor, with the addition of these script actions that manipulate controls on the
dialog box programmatically: Set Control Attributes, Set Control Text, and Set Current
Control.
Call DLL Function on page 124
Check Configuration on page 130
Check If File/Dir Exists on page 134
Display Message on page 148
Edit INI File on page 150
Edit Registry on page 151
Else Statement on page 155
ElseIf Statement on page 155
End Statement on page 155
Get Registry Key Value on page 166
Get System Information on page 167
If Statement on page 170
Parse String on page 181
Prompt for Filename on page 184
Read INI Value on page 186
Remark on page 188