AppleScript Overview

Author: David Hood
Contents Page - About AppleScript
Date Last Modified: 25th August 2003

Contents Page Page 1 of 2 Next

AppleScript is an 'English like' scripting control language for the Macintosh. It has been present, in the background, since system 7. It can be used to tell the computer, and programs on it, to do particular jobs. Scripts are written and run using the Script Editor program (other programs can also edit scripts). This program has been located in the Apple Extras - AppleScript prior to OS X. In OS X script editor can be found in the Applications - AppleScript folder.

The vocabulary of AppleScript's English like language stems from the core language, extra additions installed on the computer (such as the StandardAdditions.osax), and vocabulary specific to particular programs.

Scripts can be run from the Script Editor program. An alternative, in OS X, to running the scripts in Script Editor is to save scripts to a folder called Scripts in the Library folder of your home directory. From here you can use screenshotScript Menu (found in the AppleScript folder) to run scripts from a drop down menu in the top right of the screen. Scripts can also be saved in Script editor as applications that can be double-clicked on to run.

AppleScript's strengths lie in automation of routine tasks and moving data between applications. For automation, if you can tell AppleScript how to perform a particular job, it means (providing you save the script) that you need not preform that tasks again. Moving data can be very useful when no program does exactly what you want it to, but several programs working together do. you can use AppleScript to co-ordinate the actions of the programs you are using.

As an example, when working on documents I like to save the file as a new version each time I work on it (just in case I need to go back to a much earlier version). As part of the file name I like to put a date/time stamp. This means that I can tell at a glance when I worked on a particular file, and if viewed in list or column view the latest file is at the end of the list. So for example my current version of a quantitative methods chapter might be named:


Where in the time stamp 03 is the year, 08 is the month, 27 is the date, 13 is the hour, and 23 is the minute. While I could construct this code manually, it is easier to get the computer to do it for me.