Specifications
There are always five arguments because there is no mechanism to determine how many
arguments are actually needed by the script.
Writing an AppleScript for applications
Handler
The custom AppleScript must contain a run handler that takes a single argument, as follows:
on run {args}
...
end run
Arguments
When the configurator invokes the run handler, it passes a record to the single argument with
useful information. The following table describes the fields in the record.
DescriptionField
The name of the Switch server hosting the configurator that executes
this script(see referring to Switch below)
server
An instance of the Job class (part of the Switch scripting API)
representing the incoming job (see referring to Switch below)
jobobject
The absolute path (including name and extension) of the incoming
QuarkXPress file (that is, the job itself of the main file inside the job
folder), or the empty string if there is none
infile
This field is provided only to scripts attached to the "open" action
The first argument passed to the script (or the empty string if there
is none)
arg1
The second argument passed to the script (or the empty string if
there is none)
arg2
The third argument passed to the script (or the empty string if there
is none)
arg3
The fourth argument passed to the script (or the empty string if there
is none)
arg4
The fifth argument passed to the script (or the empty string if there
is none)
arg5
Return value
The script's run handler must return a string value as described in the following table.
Return value in case of errorReturn value in case of successAction
Error message starting with
"/ERROR/:"
The string "/OK/"Open
206
Enfocus Switch 10