osx - Applescript - Copy Image, Paste as Icon -
for organizational purposes, via hotkey, i'd able copy selected image file (as in finder), paste icon selected folder, without having go 'get info' folder.
is possible?
you need 2 scripts: 1 copy image (not file image itself), other paste image icon.
copy image:
tell application "finder" open selection using (path application "preview") -- open preview end tell tell application "preview" tell application "system events" keystroke "a" using command down -- select keystroke "c" using command down -- copy keystroke "w" using command down -- close window end tell end tell
paste image icon:
tell application "finder" activate tell application "system events" keystroke "i" using command down -- open info -- set focus on icon image tell process "finder" set img (image 1 of scroll area 1 of front window) set focused of img true end tell keystroke "v" using command down -- insert image keystroke "w" using command down -- close window end tell end tell
than can bind these 2 scripts hotkeys. use fastscripts purpose.
note 1: may need enable access assistive devices under systempreferences -> accessibility
note 2: if parts of scripts not work (for example preview opened, image not selected, etc.) should try play delays.
Comments
Post a Comment