Script Runner

By script runner I mean an application that accepts compiled script files and runs them. It typically has no facilities for editing or compiling scripts; you create and compile the scripts in a dedicated editor such as the Script Editor, and save the script as a compiled script file. Usually the file must then be placed in a particular location where the script runner program can find it. The script runner program typically provides some sort of interface for selecting a compiled script; when you select one, the script runner causes it to be executed. Since the script is compiled beforehand, a time-consuming step (compilation) is skipped, and execution thus typically proceeds considerably faster in a script runner than it does in an internally scriptable application where the code must be compiled on the fly.

An extreme example of a script runner is the Script Menu provided by Apple. It’s extreme because a script runner is all it is; it has no other purpose, and it has no other interface apart from the menu of scripts. If you don’t see the Script Menu in your menu bar (it appears as a black scrolled s-shaped icon), Script Menu isn’t running on your machine; you can start it up by running /Applications/AppleScript/Install Script Menu. The menu items in the Script Menu represent the folders and script files inside /Library/Scripts and ~/Library/Scripts; you can toggle the visibility of the menu items representing /Library/Scripts with the Show/Hide Library Scripts menu ...

Get AppleScript: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.