Workshop #1: Introduction to AppleScript

About AppleScript

AppleScript IconWith the release of System 7.0 in 1991, Apple introduced a system-level technology called AppleEvents which allowed high-level communication among running applications on a Macintosh. Using a programming practice called the AppleEvent Object Model (AEOM), developers could give their programs the ability to be both observed and controlled by other applications. With System 7.1 (in the System 7 Pro bundle), Apple expanded the AppleEvents technology by adding the Open Scripting Architecture--a framework for scripting languages based on AEOM and AppleEvents--and AppleScript. Today, a large nmber of major applications and system components are scriptable, making it easy to reap extended functionality from the Mac OS and applications.

Where do I start?

Every version of the Mac OS since 7.5 has AppleScript built-in; you can find everything you need in the Apple Extras folder. (Users of System 7.0 or 7.1 can download the Runtime Kit from Apple, if they can find it...) Older versions of the AppleScript package included Scriptable Text Editor, a good application to learn applications scripting with and which we may be using for some examples in these workshops. If you don't have it, you can download it from here.

Now, before we start down the road to AppleScript mastery, we should make sure we're seeing the same thing. (You don't have to do this, but it'll make keyworks easier to identify, and your scripts look like the examples on this website.) Open up Script Editor and choose "AppleScript Formatting..." from the Edit menu, then change the fonts and colors to look like this:

Formatting

Now, on to The Basics...


Last updated 11.08.98 by Rick Roe for MacWarriors
Copyright 1998 ACM@UIUC