Atomik Xport SE: Reference > Chapter 16 Automation << >>

16.3 Scripting

Note: Scripting is available only in Atomik Xport Enterprise Edition, on the Macintosh platform.

Many Macintosh users don’t realise that there is a powerful hidden interface to their computers that could enable them to control and automate many processes on their computer, saving time and money.

AppleScript (http://developer.apple.com/applescript/) is an easy-to-use, approachable, English-like language that can control nearly everything a Macintosh computer can do and any applications with AppleScript support.

QuarkXPress itself already includes extensive AppleScript support. Atomik Enterprise Edition makes the main features of Atomik Xport available for AppleScripting too. Therefore AppleScript can be used to remove the need for user intervention in the process.

AppleScript methods supported by Atomik Xport are described below below ...

Extracting a single layout: When you want to extract a single layout to an XML file using a ruleset of their your, you can use a single method:

Extract Current Layout to XML File xml_name ruleset ruleset_path 

Extracting multiple layouts: Where you want to extract multiple layouts to one XML file using the same (or even different) rulesets, you need to create an ‘Extraction Session’:

First call method:

Start Extraction Session 

Then after opening each document or layout, call method:

Add Current Layout to Session using ruleset ruleset_path 

Note: the full path to your ruleset is required by the above methods.

Once all required documents or layouts have been added to the session then call method:

Export XML from Session to XML File xml_name 

You can do this multiple times. The encoding and other output options used will be from the ruleset used for the last (or only) ‘Add Current Layout’ method call. If no layouts have been added to the session at all then ‘Export XML from Session to XML File’ will fail.

Finally when you’re done, call method:

End Extraction Session