8.0

Table Of Contents
Scripting support
You can write server-side scripts for QuarkXPress Server Manager. These scripts are actually clients
that run in the same context as QuarkXPress Server Manager in Tomcat but do not have the overhead
of SOAP.
QuarkXPress Server Manager ships with QuarkXPress Server Manager Scripting Environment for
editing scripts, but you can use almost any script-editing application. You can run scripts manually by
choosing a menu option or toolbar option in QuarkXPress Server Manager Scripting Environment. Also,
you can schedule scripts to start and end according to specific time intervals or until conditions are met.
QuarkXPress Server Manager includes a number of sample scripts and libraries for reference. The
libraries include ready-to-use functions that perform various tasks in scripts. The samples show you how
to use those libraries, and also how to write scripts without using those libraries.
When writing scripts, you can directly access the following functions: print, readUrl, runCommand,
spawn, sync, load, debug, info, warn, error, and
exception. Launch QuarkXPress Server Manager Scripting Environment and open the sample scripts to
see how these functions can be accessed.
By default, the scripting environment of QuarkXPress Server Manager uses the file system to store the
scripts. However, if the need arises, you can write a custom implementation of the storage provider by
implementing the QScriptStorage interface and configuring the Spring configuration file,
ManagerContainerConfig.xml.
The scripts thus saved can also be executed remotely using Web services. Please see
QManagerScriptingSvc for details.
Page 41