Specifications
The JavaScript programming interface for each application is documented in the application's
software development toolkit which can be found on the Adobe web site. The Adobe Creative
Suite bundle includes the "ExtendScript Toolkit" application which is extremely useful for
developing and debugging JavaScript scripts for Adobe Creative Suite applications.
The Switch configurators for the four applications mentioned above allow posting a JavaScript
script to the application for execution. Combined with Switch's built-in capabilities this provides
powerful control of the Adobe Creative Suite applications.
Note:
In the remainder of this topic “application” means one of the four Adobe Creative Suite
applications mentioned above, and “configurator” means the Switch configurator that controls
the application under consideration.
Stages
A configurator defines the action to be executed by its corresponding application in the form of
three consecutive stages:
• Open the file and make it the currently active document.
• Perform a command on the currently active document.
• Save the currently active document and close it.
The desired action for each stage is defined independently, and can be selected from:
• One of the built-in actions listed by name.
• A user-provided script (which is specified by browsing to a JavaScript text file).
Depending on the selected action a number of subordinate properties are shown to further
configure the action. In other words, each choice has its own set of properties.
The properties for the “Use script” choice are described below; those for built-in choices are
described for each configurator separately.
Properties for specifying a user script
The following set of properties is shown for an action stage if the “Use script” option is selected
for the stage.
DescriptionProperty
The text file that contains the JavaScript script to be executed by
the application for this stage
Script file
The first argument to be passed to the script (or empty)Argument 1
The second argument to be passed to the script (or empty)Argument 2
The third argument to be passed to the script (or empty)Argument 3
The fourth argument to be passed to the script (or empty)Argument 4
The fifth argument to be passed to the script (or empty)Argument 5
There are always five arguments because there is no mechanism to determine how many
arguments are actually needed by the script.
202
Enfocus Switch 10