AppleScript and Automator: What's the Difference?
- What Is AppleScript?
- What Is Automator?
- Key Differences Between AppleScript and Automator
- Summary
For many Mac users, AppleScript and Automator are terms that bring about a sense of confusion. This is unfortunate, considering that both technologies are generally targeted at typical users (non-programmers, in other words) and designed to make life easier through automation.
Much of the confusion centers on the similarities between these two applications:
- Both automate time-consuming or repetitive tasks.
- Both interact with Mac applications.
- Both are targeted toward everyday Mac users.
But AppleScript and Automator are actually quite different. This article will attempt to clear up some of the confusion surrounding these technologies.
What Is AppleScript?
AppleScript is a scripting language that has been built into the Mac operating system since the early days of System 7. Like the rest of the operating system, AppleScript has steadily improved and expanded over the years.
With AppleScript, you write a script—essentially a set of instructions—to perform tasks within the existing applications on your Mac (the application must support AppleScript), or within the operating system itself. Scripts are typically written in an AppleScript editor such as Script Editor, which you can find in the following folder on your Mac:
/Applications/AppleScript
After writing your script, you can run it from within Script Editor, or save it and run it as an application.
Aside from some basic user-interaction capabilities, AppleScripts don't normally have interfaces. Once launched, they simply appear in your Mac's dock, and they run virtually invisibly.
Unlike programming languages such as Objective-C and Java, AppleScript's syntax is much like the English language, which means that users can learn it quite easily with no prior scripting or programming experience. Mac users often create simple scripts by trial-and-error, or by copying and pasting together pieces of existing scripts found online.
Apple provides some sample scripts with AppleScript; look in the following folder on your Mac:
/Applications/AppleScript/Example Scripts
Even without any prior knowledge of AppleScript, if you open some of these scripts in Script Editor you'll probably be able to figure out what many of them do (see Figure 1).
Figure 1 The New Applications Window sample script.