Inadequacies of the Dictionary

One purpose of the dictionary is to show the human user how to speak AppleScript to a scriptable application in order to drive that application. But a dictionary, by its very nature, is not completely adequate to this task. A dictionary is merely a list of words. Knowing a lot of words is not the same as knowing a language. Languages refer to the real world, they develop under certain conventions of communication, and they have idioms. You might know every word of the English language, including the words “how,” “you,” and “do”; but nothing about these words, qua words, would tell you what “How do you do?” means, nor would anything about these words lead you to think of generating such a phrase at the appropriate moment. An AppleScript dictionary is like that. It tells you the building blocks of the phrases you can say, but it does not tell you what to say—how, as Austin famously put it, to do things with words. Yet this is exactly what you want to know.

This section lists the main types of problem you’re likely to encounter. Forewarned, as they say, is forearmed. It is hoped that study of this section will make you a better reader of dictionaries and a wiser AppleScript programmer.

Defective Object Model

Since an application’s object model (see Section 19.3.5.3, earlier in this chapter) is a hierarchy, essentially equivalent to the chain of ofs allowing you specify any of the application’s objects, it’s clear that it requires a starting point. If ...

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.