Hi,
I'm trying to write an applescript that will add comments to a photo in iPhoto. I have descriptions and associated filenames for about 200 photos and I want to drop them into the photos' comments field. The pix are already in iPhoto and sorted in to albums, etc.
All the examples I can find for iPhoto deal with an image that is already selected but I need to go the other way. I want to find and select an image based on filename or title.
Can this be done? I can't seem to stumble onto the right syntax. Apple's
iPhoto scripting page specifically mentions 'searching' for a photo.
I've tried variations on this, no go :
set this_comment to 'some comment'
tell application "iPhoto"
activate
set this_photo to select (photo whose title is "DCP_6392.JPG") -- this is what it chokes on
tell this_photo
set the comment to this_comment
end tell
end tell
I've even tried having two more beers and it still isn't working.
I could probably do a shell script that drops the comments into the IPTC tags. then use the example script to move the IPTC tag data into the iPhoto comments. But that's more of a hassle.
thanks