• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Sharing Photos > To write an AppleScript for iPhoto

To write an AppleScript for iPhoto

1.
Launch Script Editor by double-clicking its icon in the AppleScript folder in your Applications folder.

Script Editor opens a new, untitled script window.

2.
From Script Editor's File menu, choose Open Dictionary. Then, in the Open Dictionary dialog, select iPhoto and click Open to open iPhoto's AppleScript dictionary (Figure 8.20).

Figure 8.20. iPhoto's AppleScript dictionary lists the commands and syntax necessary to write AppleScript scripts that can control iPhoto.


An application's dictionary is a list of all the AppleScript commands and syntax that the application understands.

3.
Write your script in the untitled script window, saving it when you're done (Figure 8.21).

Figure 8.21. Enter your script into Script Editor, and when you're ready to test it, click Run.


4.
Click Run to test your script.

Crib Code, Ask Friends

When you realize you need to automate a repetitive action, a good way to start learning scripting is to find a script that does something similar and modify its behavior. Of course, it always helps to have AppleScript-savvy friends to ask for help, too!



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint