Specifications
Property definition properties
Each property definition in the script declaration includes:
• A tag used to uniquely identify the property to the script and its human-readable name.
• The type of property editors used to enter a value for the property.
• Specifications for validating the property value.
See property definition properties and property editors for reference information.
Scripted plug-in
A scripted plug-in is a script package which when saved with the appropriate password and
placed in the appropriate folder, behaves just like a tool or configurator built into Switch. This
allows Enfocus and its licensed partners to create built-in tools and configurators using scripting.
Scripted plug-ins are of no concern to regular Switch users. Enfocus may license selected
third-party vendors to develop scripted plug-ins.
If you are interested in developing a scripted plug-in then refer to the following topics:
• Obtaining permission
• Creating a scripted plug-in
• Configurator guidelines
10.3 Scripting languages
JavaScript
The Switch-internal scripting language JavaScript is intended primarily for working with variables
and functions provided by Switch (rather than the operating system). A primary goal of the
internal scripting language is to work with the contents of metadata fields associated with the
jobs being processed.
Switch supports a substantial JavaScript subset (more precisely, it supports a subset of the
ECMAScript 4.0 language), with extensions for:
• Accessing key Switch variables and functions, including the metadata context of the job being
processed.
• Reading and writing plain text files.
• Reading and writing XML files and performing XSLT transforms.
• Executing a command line application.
• Database access
• Web services access
JavaScript scripts have limited "external access". For example, there is no way to communicate
with interactive applications and there is no access to operating system services.
JavaScript scripts are cross-platform, that is they work without change on both Mac OS X and
Microsoft Windows.
138
Enfocus Switch 10