Appendix A. Standard Scripting Additions

Scripting additions are a powerful element of AppleScripting that give it almost infinite extensibility. These code libraries live inside the startup disk:System Folder:Scripting Additions folder in OS 9. Figure A-1 shows what their icons look like. Known among the scripting cognoscenti as osax (singular form, standing for Open Scripting Architecture Extension) or osaxen (a plural form), the scripting additions give you commands you can use almost anywhere in your script. Ever since Mac OS 8.5, Apple Computer has bundled a number of the most useful scripting additions into the Standard Additions file and installed this file with your operating system. In Mac OS X, the filepath for the Standard Additions file is /System/Library/ScriptingAdditions/StandardAdditions.osax.

Scripting addition files in OS 9
Figure A-1. Scripting addition files in OS 9

Tip

In Mac OS X, if you want a scripting addition to be available to all users, then the administrator (the first user who installs Mac OS X, or somebody she designates as administrator) should place it in /Library/ScriptingAdditions/. This administrator should first create the Scripting Additions folder if it does not yet exist. If you want a scripting addition to only be used by one user, place it in this directory: /users/username/library/ScriptingAdditions/. You can create this directory yourself, in a particular user’s Library ...

Get AppleScript in a Nutshell 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.