Specifications

The Properties pane allows viewing and editing the properties for the currently selected item in
the Declaration pane or in the Fixture pane. The properties for each item are described in the
Declaration pane and Fixture pane topics.
This pane is very similar to the Properties pane in the Switch designer.
SwitchScripter Message pane
The Messages pane displays a list of log messages generated by test runs of the script (see testing
a script). You can filter and sort the messages using the controls at the top of the pane.
This pane is very similar to the Messages pane in the Switch designer.
17.2 Writing and testing a script
Writing a script
SwitchScripter's primary function is to create and edit script packages for use with PowerSwitch.
A script package is an archive file (with the ".sscript" filename extension) that contains a script
declaration, one or more alternate script programs and an optional icon for the script.
Creating a new script
To create a new script package for PowerSwitch from a blank sheet:
1. Launch SwitchScripter or, if it is already running, press the "Create new" tool button.
2. The newly created script package is setup for JavaScript; skip the next step if Javascript alone
is required; otherwise select choice of scripting language(s) as explained in the next step.
3. In the Declaration pane, select the root element (representing the script as a whole) and set
the "Include JavaScript/VBScript/AppleScript" properties according to your wishes (also see
Selecting a scripting language).
4. Use the Declaration pane to further configure the script declaration, including supported
connections and injected properties.
5. The Program pane has been initialized with a template (empty stubs) for the two most
important entry points supported by the scripting API. Enter your custom program text inside
the function body of the entry point(s) you need, remove the stubs for entry point(s) you do
not need and add any other entry points you may need.
340
Enfocus Switch 10