Apple Scripting Iphoto
Added 29 Jul 2008
Although iPhoto doesn't offer a Scripts menu of its own, you can get the same effect by using the system-wide Scripts menu. Inside the AppleScript folder within your Applications folder is a file that bears a folder icon named Script Menu.menu. Double-click this folder icon to add a system-wide Scripts menu to the right side of your menu bar. The system-wide Scripts menu provides a home for the scripts used with applications that don't provide Scripts menus of their own.
Apple makes a nice assortment of example scripts available at Apple.com Not only are these great examples from which you can figure out scripting techniques, but most of them are also extremely useful in their own right. One example, Find Unassigned Images, creates an album for you consisting only of images from your photo library that aren't already in at least one album. Not only is that script useful, but you can also easily modify the script to create a list of albums to which an individual photo belongs.