Changing Photos Titles via AppleScript
I like to add titles to every image by hand in Apple Photos. I prefer to do it when the image is filling the window, not as thumbnails. In this mode, it's really tedious to use the Get Info pane. I have to click back and forth between the image (hitting the arrow key to advance to the next image) and back to the Get Info pane to set the title.
A friend of mine wrote a little AppleScript for me that allows me to select a bunch of photos and then enter names and hit the enter key to advance to naming the next photo. The only problem is that it doesn't show me which photo I'm naming (doesn't bring them up as large photos) so I easily get confused.
I've been hunting for a way to tell AppleScript to open the image up and then advance. Here's the script:
tell application id "com.apple.Photos" -- Photos
set selectedPhotos to selection
repeat with i from 1 to count selectedPhotos
set thisPhoto to itemi of selectedPhotos
display dialog "Enter the name of this photo and say ’Thank you, Ray':" default answer ""
set thisName to text returned of result
set name of thisPhoto to thisName
end repeat
end tell
I've tried telling System Events to press the space bar (with key code 49) but that didn't work to open up the image. Of course I need to advance too...
Ideas?