

These are standalone scripts that don’t affect specific applications. What we’ll study today is called User Interaction. This means that when you compile your script, each element will be colored, so you can recognize it easily. You have just changed the formatting of the text you’ll be writing in Script Editor. Click the Use Defaults button, then click Apply.Open Script Editor’s Preferences by selecting Script Editor > Preferences in the menu bar (or pressing ⌘,).Tweaking the Preferencesīefore we go any further, you will have to make sure Script Editor’s Formatting preferences are set to default: (Note that if you click Run without compiling your script, it should automatically compile and run if the syntax is correct). When you have written something in the middle section of the window and click Compile, Script Editor checks the syntax of your script and prepares to run it. We will be using only two of them for now: Compile and Run. There are several buttons on the top and the bottom of the window. This is the window where you will be writing scripts. Open Script Editor and create a new file (File > New or ⌘N).

To write AppleScripts, you need Script Editor, an application included with Mac OS X (located in /Applications/AppleScript/). Script Editor - The Scripting Application AirPort Apple Apps Backups Developer Education Email Hardware Internet iPad iPhone Mac Music Network Photos Security TV Weekend WonkĪpple describes AppleScript as “an English-like language used to write script files that automate the actions of the computer and the applications that run on it.” I’d add that AppleScript is the easiest scripting language to learn, because it’s so similar to English and it’s very easy to understand.
