WiseScript Editor Reference
23
For an example of how to complete these details, see
Creating a User-Defined Action:
Tutorial
on page 24.
To create a user-defined action
1. Select File menu > New.
In Script Editor, you should see a completely empty script.
2. If your user-defined action includes a dialog box where you can enter options for the
action, create the dialog box.
a. From the Event drop-down list in Script Editor, select Exit.
b. Add a Custom Dialog action to the Exit script, and create your dialog box in the
Custom Dialog Editor.
See
About the Custom Dialog Editor
on page 92.
Note
To add a drop-down list on your custom dialog box that contains all the
WiseScript variables currently defined in this script, set the list to display the
compiler variable %_VAR_LIST_%. It contains all the non-compiler variables.
3. From Event, select Mainline.
The main script reappears.
4. Add script lines that perform the function of your user-defined script action.
This might be something as simple as a single line that calls a .DLL, or it could be a
complex set of script lines that perform an advanced function.
5. In Title, enter a combination of text and variables to define the format of the script
line.
Example: Your user-defined action displays an HTML file on the Web. In your action,
a dialog box asks for the URL to the file, and the URL is put in the variable
URL_PATH. In Title, you might enter: Display HTML File %URL_PATH%. When you
add your user-defined action to an installation script, the dialog box appears and
you enter www.sample.com/support.htm for the URL. The script line for your user-
defined action appears in the format you specified, except that it shows the
variable’s value instead of the variable name. It displays: Display HTML File
www.sample.com/support.htm.
6. Save the script file in the Actions subdirectory of this product’s installation directory.
Your new action does not appear in the appears in the Actions list in Script Editor
until you close and re-open WiseScript Editor.
7. Test the new user-defined action:
a. Close WiseScript Editor.
b. Open WiseScript Editor and select File menu > New > Empty Project.
c.
In Script Editor, double-click your user-defined action in the Actions list. If it
includes a dialog box, the dialog box opens. Complete the dialog box and click
OK.
d. Save the project and click Test to test your script.
Summary of Contents for ALTIRIS INVENTORY 7.0 SP2 - FOR NETWORK DEVICES V1.0
Page 1: ...WiseScript Editor Reference ...
Page 31: ...WiseScript Editor Reference 31 ...
Page 91: ...WiseScript Editor Reference 91 ...
Page 148: ...WiseScript Editor Reference 148 ...