Over 75 scripts are part of the basic Mac OS X installation in Jaguar. Many of them are installed in Script Menu and are located in /Library/Scripts. Others are part of applications. (iCal, for example, contains four scripts that it uses to send Mail messages to invite people to meetings or to remind you of events.)
This hour shows you each of the Script Menu scripts. It shows you how to use them, and it points out some of the features that you can use in your own scripts when you write them. Remember that each script in this collection comes with its AppleScript code. You can open them in Script Editor to view that code.
Some of the scripts are compiled scriptswith a .scpt extension; those can be double-clicked to open them in Script Editor. Others are saved as applications, but you can open them by dragging them on to the Script Editor icon or by using the Open command from the Script Editor File menu. All scripts in Script Menueven .scpt compiled scriptsrun as applications when you select them in Script Menu.
By the end of this hour, you will have not only seen many of the things that you can do with AppleScript, but you will have discovered new features that are built in to Mac OS X that you may never have known were there!
The scripts described in this hour are listed in the same groupings that are used in Script Menu. However, in Script Menu the groupings are listed alphabetically. Here, they go from the basic desktop scripts to the Internet scripts and then on to more specific scripts.
In This Hour
BasicsThis is the beginning of your AppleScript adventure. In this section, you'll see how one script works.
Finder ScriptsBuilt in to Script Menu are scripts that let you manipulate files and their names. They're described in this section.
Info ScriptsThese scripts use AppleScript's ability to interrogate your computer's environment.
Internet ServicesMoving beyond the desktop, these scripts let you retrieve information from the Internet using Web services.
Mail ScriptsMail is a heavily scriptable application. These scripts let you create mail automatically.
Navigation ScriptsThese scripts automatically open Finder windows such as Documents and Applications.
Script Editor ScriptsScript Editor itself (discussed later in Hour 8, "Introducing Script Editor") is scriptable. These goodies provide fast ways of adding standard code to your scripts.
Folder Action ScriptsOne of the most popular AppleScript features is back. You can be notified when the contents of folders change.
ColorSync and FontSync ScriptsFinally, these scripts automate vital prepress functions.