![]() |
About This WorkshopIf you've never even heard of scripting before, this is the tutorial for you. We'll explore the basics of using AppleScript to automate tasks and improve your workflow, starting with a walkaround of the Script Editor and proceeding through some general concepts used in scripting to write a few useful scripts. About AppleScript
Since AppleScript is such a versatile technology, it's a bit hard to define. Some say it's like a tool; like a microwave, you put stuff in, press a few buttons, and in a few seconds you have what you want. Or like a tape recorder (or a macro utility), it lets you record a set of actions and then play them back to make them happen again. Others point out how versatile it is as a programming language--though it's not actually a full-fledged programming language, it inherits a few abilities from them which set it well above macro utilities and other automation software. But perhaps the best description of AppleScript is as an interface--a means for you to interact with the computer. Like the Mac's graphical interface of icons and windows and buttons, or the geek-preferred command-line interfaces found in UNIX and other operation systems, or even the speech-recognition and eyeball-tracking systems designed for special applications or for the disabled, AppleScript is a layer that sits between the user and the computer, passing commands and data back and forth in forms each can understand. Specifically, AppleScript is a language interface--you tell it what you want the computer to do, and it does it, often returning verbal feedback. Though it somewhat follows the structure of a programming language, AppleScript commands, and the results they return, are in plain English (actually, in plain whatever-language-your-Mac-is-localized-for), so creating and understanding scripts is easy. AppleScript's greatest strength is its ability to control and manipulate applications; it can control the Finder, working with files and folders, or a Web browser, directing it to different URLs, or even a database application or a publishing application. The sky's the limit. |
Next: The Script Editor |