Meet the Script Menu
Mac OS X has a Script Menu, but it’s well hidden! To switch it on, launch the AppleScript Utility in the AppleScript folder. A checkbox in the application’s window will activate the Script Menu. Selecting the checkbox below it will reveal a library of scripts that Apple has built into OS X. You can also add your own scripts to this menu, giving quick access to them regardless of the application you’re running at the time. Scripts run via the Script Menu effectively run behind the scenes as part of the operating system, so they don’t need to be standalone applications (keeping them nice and small) and don’t launch the Script Editor either (making them super fast).
A good example of the usefulness of AppleScript is one that tells QuickTime to present a movie in fullscreen mode (otherwise available only to QuickTime Pro users). The following script works by first telling QuickTime Player how to play the currently active ("front") movie; that is, in fullscreen mode ("present") scaled up to the size of the display ("scale screen"). The movie is also paused ("pause") so that you can start playing it as and when required simply by striking the spacebar.
tell application "QuickTime Player" present front movie scale screen pause front movie end tell
Once you’ve created the script, save it somewhere in your Home folder. Now, click on the Script Menu and select the Open User Scripts item in the Open Scripts Folder submenu. Put an alias of the QuickTime script you’ve just created into this folder. You should now find that when you select the Script Menu item again, you will spot your QuickTime script at the bottom of the menu, ready to go! Test it out by launching a QuickTime movie of some kind and then running your script from the Script Menu. If everything works to plan, the movie will fill the screen and await your command to run.
Figure 2 By selecting a script that forces QuickTime to present a movie in fullscreen mode, you bypass one of the shortcomings of the standard-issue QuickTime player!