tell application "iPhoto" (* WHY DOESN'T THIS WORK?? I wanted to create a new "Review" keyword automatically but this doesn't work. So instead I replaced it with a choice of existing keywords. It's up to you to make a new keyword yourself if you want to. set theKeywords to (name of every keyword) if theKeywords contains "Review" then --display dialog "Yes" else set newKey to (make with properties {name:"Review"} new keyword at end of keywords) end if *) set assignKeyword to (choose from list theKeywords as list with prompt ("Select the keyword you wish to assign to photos NOT in albums")) if assignKeyword is false then display dialog "Action cancelled" giving up after 3 -- yes, two ells return end if set assignKeyword to (item 1 of assignKeyword) as Unicode text set current album to photo library album set allTheAlbums to albums set theAlbumPhotos to {} repeat with j from 1 to count of allTheAlbums set theAlbumPhotos to theAlbumPhotos & (id of every photo of (item j of allTheAlbums)) end repeat set theLibraryPhotos to (id of every photo of (photo library album)) repeat with i from 1 to count of theLibraryPhotos set thePhoto to id of photo i of photo library album set inAnAlbum to false set inAlbum to false if thePhoto is in theAlbumPhotos then set inAnAlbum to true end if if inAnAlbum is false then select (photo id thePhoto of photo library album) assign keyword string (assignKeyword as Unicode text) end if if (i mod 50) is equal to 0 then -- Displays a dialog of progress every 50 photographs display dialog ("Progress: " & i & "/" & (count of theLibraryPhotos)) giving up after 2 end if end repeat display dialog ("Done: " & i & "/" & (count of theLibraryPhotos)) giving up after 5 end tell