Organizing photos in Mac Photos

When organizing photos in the Mac application Photos I put a long description in the Title of each photo. When moving those photos to WordPress I realized that the Description field was used for captioning photos in a Gallery. Instead of copying and pasting the title of each photo into the description, I searched for a way to do it using a program.

Found an AppleScript for doing a similar operation so after a little trial and error figured out how to move the title to the description field. As it turns out the variable name for the Title is “name.”

tell application “Photos”
set mySelection to (get selection)
if mySelection is {} then
error “Select photos before using script.”
repeat with thePhoto in mySelection
tell thePhoto
set the description to the name
end tell
end repeat
end if
end tell