Specifications
• Use SwitchScripter to develop and test the script expression, and then load it into the
appropriate property editor dialog box.
SwitchScripter offers several advantages for working with complex script expressions. Most
importantly, you can setup test fixtures to verify the script expression's results without having
to activate a flow and process jobs, and you can save the script expression in a script package
for future use (like when using a script expression) or for sharing it with other users.
Access to scripting API
A script expression has access to a subset of the Switch scripting API (application programming
interface). In general, a script expression should not have any persistent side-effects; for example
it cannot modify the current job or write data to disk. There are two notable exceptions to this
rule however: a script expression can log messages and it can update global user data. The
following subsections describe in more detail which portions of the scripting API can be accessed
from a script expression.
Note:
Do not attempt to violate these limitations (even if Switch inadvertently allows you to do it); the
result is undefined and most likely disastrous.
Predefined variables
A script expression can use the following predefined global variables:
• job: an instance of the Job class which represents the job being processed or considered at
the moment of script evaluation.
• s: an instance of the Switch class which represents the flow element in which the script
expression is defined (and its environment).
134
Enfocus Switch 10










