Specifications

Error handling
The third-party application should clearly document how Switch can discriminate between:
Successful execution versus failure to execute an action.
Messages that should be passed on to the Switch execution log versus messages that are
irrelevant to the Switch user (or output that can safely be ignored).
The “level” of messages passed on to the Switch execution log: info/warning/error.
Serialized communication
If required, Switch can serialize all communication with a third-party application, even if many
instances of the same configurator are active simultaneously. See Execution modes on page 356
for more information.
Switch can also automatically terminate a third-party application if an action does not complete
within a certain amount of time (which is configurable as a user preference).
Platform considerations
If a third-party application is available on both Mac and Windows, it is acceptable (but not
necessarily preferable) to use a different communication mechanism on each platform. For
example, the Adobe Acrobat Distiller configurator uses COM on Windows and AppleScript on Mac.
In other words, a Switch configurator can include platform-specific code, as long as the user’s
view of the configurator’s properties and behavior is the same on both platforms.
Platform-specific behavior is achieved by including an implementation in two different scripting
languages (see script package and selecting a scripting language) or through the
Environment.isMac() and Environment.isWindows() functions.
Communication mechanisms
Communication with the third-party application is implemented mostly (or solely) in the
configurator's jobArrived entry point.
Command line
From an implementation standpoint this is often the easiest form of communication. The Switch
configurator compiles command line options based on the configurator properties and if necessary
Switch provides console input and/or parses console output. Alternative sources of information
may be the application’s return code and log files written by the application.
Inter-application communication
Applications that offer a graphical user interface (and thus are often launched by the user
independently of Switch) can be controlled using inter-application communication mechanisms
(usually COM in VBScript on Windows and AppleScript on Mac).
Hotfolder
A hotfolder application could be driven from a Switch configurator on the condition that it is
possible to configure the application’s behavior using a single watched folder and a control file.
There can be several setups including:
The control file is placed in a watched folder and points to the path of the input file(s).
The input file and the control file are both placed in the same watched folder (and they are
matched through some filename pattern).
351
Enfocus Switch 10