Created
September 19, 2024 09:30
-
-
Save jswright61/d02cf0d375a76e8990c55cb8442c0750 to your computer and use it in GitHub Desktop.
Applescript to get the filenames of the currently selected Photos in Apple Photos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tell application "Photos" | |
| activate | |
| set thePhotosFiles to {} | |
| set imageSel to (get selection) -- get the selected image | |
| repeat with im in imageSel | |
| set thePhotosFiles to the ({filename of im} & thePhotosFiles) | |
| end repeat | |
| set AppleScript's text item delimiters to return | |
| --set AppleScript's text item delimiters to "," | |
| set theDelimitedPhotosFiles to thePhotosFiles as string | |
| set AppleScript's text item delimiters to "" | |
| set the clipboard to theDelimitedPhotosFiles | |
| return theDelimitedPhotosFiles | |
| end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment