A Day in the Life
Although I know that FrameMaker is scriptable, I have no idea how to script it. I haven’t the slightest notion how to talk to FrameMaker, using AppleScript, about the illustrations in my manuscript. So the first thing I need to do is to try to find this out.
Caught in the Web of Words
My starting place, as with any new AppleScript programming task, is the dictionary of the application I’m going to be talking to. The dictionary is where an application lists the nouns and verbs I can use in speaking to it with AppleScript. To see FrameMaker’s dictionary, I start up Apple’s Script Editor, open the Library window, add FrameMaker to the library, and double-click its icon in the Library window. The dictionary opens, as shown in Figure 3-1.
Figure 3-1. FrameMaker dictionary
This is a massive and, to the untrained eye (or even to the trained eye), largely incomprehensible document. What are we looking for here? Basically, I’d like to know whether FrameMaker gives me a way to talk about illustrations. To find out, I open each of the headings on the left, and under each heading I open the Classes subheading. A class is basically a noun, the name of a type of thing in the world of the application we’re talking to. So what I’m trying to find out is what things FrameMaker knows about, so that I can guess which of those things is likely to be most useful for the problem I’m facing. ...
Get AppleScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.