Q: applesoft for Photos
I have all my Albums at the top level and I want to group them into Folders. There does not seem to be a way of selecting multiple Albums and dragging them into a Folder so I thought I would have to do it with an Applescript.
So far I have:
tell application "Photos"
set listFolders to {"2005"}
repeat with i in albums
set tAlbum to get name of i
# each folder name starts with the year
set tFolder to characters 4 thru 1 of tAlbum as string
if tFolder is in listFolders then
set name of container of tAlbum to tFolder
end if
end repeat
end tell
but get the error
error "Can’t get container of \"2005-04-30MarkRace\"." number -1728 from «class IPct» of "2005-04-30MarkRace"
which I interpret as meaning that a top level Album has no Container.
Can anyone help me.
Thanks
t
se
Posted on Sep 28, 2016 4:03 AM