AppleScript add photos to album
This should be easy, and I probably have not had enough coffee.
I am trying to cycle through every selected photo and add it to an album based on it's name. I can test if the album exists successfully and even add it if it doesn't. Where I keep failing is the command to add the image to the album.
Assuming theImage is the image reference in my repeat and theAlbumName is name of the Album I am trying to add to:
add theImage to album theAlbumName
I assume I need to get the reference to the actual album, not just it's name, but trying
set theAlbum to album with name theAlbumName
add theImage to album theAlbum
also fails. What obvious thing am I missing?
Mac OS X (10.7.5)