Mail Archiver uses a lot of AppleScripts. Sometimes I send users those AppleScript for testing. Today I'm going to look at the ScriptEditor interface and how to run AppleScripts.

Interface of the ScriptEditor

The interface of the ScriptEditor is very simple. There are a couple of buttons. Below the buttons is the area for the script itself. Below that area is the result of the script.


  1. The first red button is to record scripts which is theoretically possible. It's a lot of work for the developer to make an app scriptable. Recording scripts is even more work. Therefore, being able to record scripts is really rare. Back in my days at GM I did a lot of VBA (Visual Basic for Applications). For Excel recording scripts was a nice way to get started.
  2. The button with the square stops the execution of a script if a script is running.
  3. The button with the triangle runs a script.
  4. The button with the hammer makes a syntax check for the script. Without correct syntax the script can't be executed.

Running scripts

Running scripts is as simple as clicking on the button with the triangle. ScriptEditor with result

Here I have executed a very simple script to get account information from Mail. The result area shows the list of accounts with some additional data.

The real fun - of course- is creating scripts. The single most important missing feature in ScriptEditor is a debugger. With a debugger it's possible to see in realtime when the values of properties are. ScriptDebugger from LateNight Software has such a debugger for AppleScript. For my simple scripts I don't really need a debugger.