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...]

MacTech AppleScript Essentials Column > Working with Text

July, 2005 - Working with Text.

When writing AppleScript code, many of the things that you will automate will involve working with and manipulating text in some manner. For example, you might need to write a script that will retrieve text content from a FileMaker Pro database, and then place that content into an Adobe InDesign document. You may need to maintain a text-based log file of your script's activity during processing, or you may need a script that will extract content from email messages, and write the content to files on a server.

During this month's article, we will discuss a number of ways to work with text, including ways to break text apart, search text, and read from and write to files. [Read more at MacTech.com...]