Dictionary
A scriptable application defines a repertory of Apple events to which it is prepared to respond, and to be scriptable with AppleScript, it must publish information about this repertory, so that when a script targeting the application is compiled or decompiled, the AppleScript scripting component can confirm that the English-like words of its code really are defined by the application, and can translate between those English-like words and the Apple event structures that will actually be used when communicating with that application as the script runs. Such publication is performed through a dictionary. Not just scriptable applications must have a dictionary; scripting additions must have one too. And AppleScript itself has a dictionary (displayed in Appendix A).
Physically, a dictionary may take one of two forms:
In Mac OS 9, and optionally on Mac OS X (typically under Carbon), a dictionary is a resource of type '
aete‘. The format of an 'aete' resource ('aete' stands for Apple Event Terminology Extension) is formally defined in:/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ Frameworks/AE.framework/Versions/A/Headers/AEUserTermTypes.h and is documented at http://developer.apple.com/documentation/mac/IAC/IAC-308.html.
In a Cocoa application, a dictionary is a set of XML (property list) text files inside the application’s package, with file extensions
.scriptSuiteand.scriptTerminology. For the.scriptSuiteand.scriptTerminologyfile formats, see: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access