Operating Systems > 10.11 El Capitan (Jul 2015)

Prompt for filename after or before taken a screenshot

(1/1)

chrisNova777:
https://discussions.apple.com/thread/7287386?start=0&tstart=0

interesting post here on how to use some of the hidden power + potential of scripting used in combiation with ui in osx

APPLESCRIPT!!


--- Code: ---set f to (choose file name default location ¬
  "/Users/user/Pictures/Screenshots" default name (do shell script "date +'Screenshot-%Y%m%d-%H%M%S.jpg'"))'s POSIX path
do shell script "screencapture -i -P -tjpg " & f's quoted form
--- End code ---


--- Code: ---set n to do shell script "date +'Screen_%Y%m%d_%H%M%S.png'"
tell application "SystemUIServer"
    set f to (choose file name default location (path to desktop) default name n)'s POSIX path
end tell
do shell script "screencapture -i " & f's quoted form
--- End code ---

Navigation

[0] Message Index

Reply

Go to full version