X-Ray Magazine Scripting Quark Article > Scripting Text

Vol. 3, Num. 4 - Scripting Text.

Learning how to automate QuarkXPress with AppleScript can be simple or complex, depending upon the tasks that you plan to automate.
First, you need an understanding of the core AppleScript language. You can do this by familiarizing yourself with the AppleScript Language Guide, which can be found on Apple's AppleScript web site at http://www.apple.com/applescript. A comprehensive AppleScript book, such as Danny Goodman's AppleScript Handbook, available from SpiderWorks, LLC, (http://www.spiderworks.com) is also a good way to get started. Next, you will need to be familiar with QuarkXPress' AppleScript support. This can be done by opening and reviewing QuarkXPress' AppleScript dictionary in Script Editor, and by exploring QuarkXPress' Apple Events Scripting documentation, DOCUMENTS > APPLE EVENTS SCRIPTING FOLDER within your QuarkXPress folder.

You will learn quickly that QuarkXPress' AppleScript support is fairly robust, and many of the repetitive and time-consuming tasks that you perform within QuarkXPress on a daily basis can be automated with AppleScript. In future articles, we will discuss using AppleScript to automate many of these tasks, including working with picture boxes, printing, and more. This month, however, we will begin with discussing how AppleScript can be used to automate interaction with something that affects every QuarkXPress user — text.

There are a large number of text-related tasks that can be automated in QuarkXPress with AppleScript, much more than can fit into a single article. Therefore, for now, we will discuss a small subset of these tasks, including creating a text box, adding text to a text box, and retrieving text from a text box. We will continue our exploration of AppleScript-based text interaction further in future articles, but, you are encouraged to continue exploring on your own as well. [Read more at X-Ray Magazine online...]