Chapter 11. Scripting iLife Applications

One of the key uses of AppleScript is to automate tasks. These may be simple tasks, like renaming the files in a folder, or more sophisticated tasks such as extracting images from the Internet and creating a slide show from them. In both cases, AppleScript can be used to automate the task for you. This is particularly valuable when you are required to type the same sequence of commands over and over again.

As of this writing, of the five applications that are part of iLife—iTunes, iPhoto, iMovie, iDVD, and GarageBand—only three of the five are scriptable. That is, only iTunes, iPhoto, and iDvd contain dictionaries that define classes and commands that you can use from an AppleScript program. All is not lost, however; through a process known as GUI scripting you can still get nonscriptable applications—such as iMovie and GarageBand—to do things for you from within an AppleScript program. GUI scripting is covered in Chapter 13.

In this Chapter, you learn how to start scripting iTunes, iPhoto, and iDVD. When you read through the sections in this chapter, notice the common approach that applies to scripting each of these applications. This will help you understand how to approach scripting new applications that you may encounter in the future.

If you don't have the iLife applications on your system, read through this chapter anyway. It will help reinforce the concepts taught in the previous chapters. Because iTunes is the most popular iLife ...

Get Beginning AppleScript® 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.