Monday, July 16, 2018

#1 2003-07-05 11:00:45 pm

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Save Screen Capture to specific location

Set a target folder and this script will save screen captures as PDF in that folder with uniquely numbered names. Uncomment the end of the script for more information about the screencapture CLI which will allow you to save portions, set the captuer to the clipboard, etc.

OS version: OS X


set target_folder to (path to desktop) as string
set file_prefix to "sc_"
set sc_num to 0
tell application "Finder"
       set sc_num to sc_num + 1
       set file_name to file_prefix & sc_num & ".pdf"
       if (exists of file (target_folder & file_name)) = false then exit repeat
   end repeat
end tell
do shell script "/usr/sbin/screencapture -x " & ((quoted form of POSIX path of target_folder & file_name) as string)

--to return screencapture help:

   return do shell script "screencapture"
on error the_err
   return the_err
end try

One mans trash is another mans treasure

Filed under: Finder



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)