Free since 2005 · No login required
AT

Academic Tutorials

Learn at your own pace

site-mobile-top-banner · 320x50

Relation between Mac and Apple Script

Added 29 Jul 2008

For more than ten years now, every Mac that shipped with system 7.1.1 (also known as System 7 Pro) and all the following operating systems had everything it needed to use AppleScript you didn’t have to do any special installs, you had hardly any configuration issues from Mac to Mac, and you received a basic array of scriptable applications that grew rapidly (and still does).



What this means is that writing scripts and installing and running them on other Macs requires transporting the script file alone, not a whole array of other resources; everything you need to get started is there. Of course, you have to provide any third-party applications you want to script. What’s truly remarkable about AppleScript is that most of the language’s power comes from the applications you automate. For better or worst, the level to which applications can be automated, and the ease in which you can include them in an automated solution, is largely up to the software vendor. It is up to the development team of every application to implement scriptability for any feature they imagine someone would want to automate.

For example, it wasn’t until a few years ago that Adobe jumped on the scripting bandwagon and started incorporating AppleScript support into its widely used graphics program. Adobe Illustrator 9 was the first major Adobe application to ship with an AppleScript interface; this was followed by InDesign, which started out boasting a comprehensive scripting vocabulary, and finally Photoshop 7 came out-of-the-box scriptable as well (although you could script Photoshop with the PhotoScripter plug-in from Main Event Software a couple of years before that). As it stands, the very existence of AppleScript depends on the applications that support it. For commercial-software developers, making an application scriptable doesn’t mean simply checking a Make Scriptable check box in a Compile dialog box; rather, they have to spend hours of programming to make it happen and to do it well.

When writing applications in the Cocoa environment, you can make some basic scripting dictionaries easily available; however, to allow scripters to automate their applications, developers must put a good amount of thought, planning, and development time into the scriptability of their applications. To make an application scriptable, the developer has to create special terminology for each feature they want to make scriptable and come up with an object model for the application. That can add up to many hours and can’t be done as an afterthought. However difficult, software developers see good return on their investment when companies integrate their applications into automated solutions. This alone ties that application to the client and lowers the chances the client will dump their application for a competing product