I have a photograph selected in Photos like so :
I want to make a macro that when triggered by hotkey, will copy this image to ~/Desktop. How can I do that. So far I have
Thank you for any help.
I have a photograph selected in Photos like so :
I want to make a macro that when triggered by hotkey, will copy this image to ~/Desktop. How can I do that. So far I have
Thank you for any help.
This is fairly easy.
See the following for examples:
You can also do a forum search using this criteria:
tag:files_folders move
If you get stuck, or have questions, feel free to ask more.
Hey Peter,
I get action failed when I try and trigger the macro on a photo :
Is my macro :
Also can I ask what do %ICUDateTime expand to? I understand the year, month, day and second expansion.
Also I am curious what is the best way to debug these issue? Is there something built-in to KM that allows me to easily do it?
Sorry, I missed that you are using the Photos app.
In that case, just select one or more photos in the Photos app, and trigger this macro, which is just a container for the AppleScript:
2016-07-22 17:12 CT (Fri)
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
### UnComment the next statement if you want an explicit folder set
--set folderOutput to (((path to home folder) as text) & "Documents:Test") as alias
### Comment out the next statement if you use the one above
set folderOutput to (choose folder with prompt ¬
"Choose FOLDER for Export of Selected Photos" default location (path to home folder))
tell application "Photos"
set photoList to selection
set numPhotos to count of photoList
export photoList to folderOutput with using originals
end tell
tell application "Finder"
open folderOutput
activate
end tell
beep
set msgStr to ((numPhotos as text) & " Photos have been exported")
display notification msgStr ¬
with title "Export Photos to Folder"
##Macro Library [Photos] Export Selection of Photos to Folder
[Photos] Export Selection of Photos to Folder.kmmacros (2.3 KB)
UPDATED: 2016-07-22 17:12 CT (Fri)
ADDED Choose Folder
ADDED Open Output Folder after export
The action is failing because there is not an image on the clipboard.
See the documentation on the ICUDateTime token.
The format is a specified with an ICU Date Time Format Specifier which allows you to produce the date in almost any format you desire.