Created
May 24, 2020 18:55
-
-
Save jasontucker/1970a4ca9a2b5dee9ee5502e53ba2238 to your computer and use it in GitHub Desktop.
This file contains 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
-- determine if path to '~/Pictures/Screenshots' exists, if not, create it | |
set homeFolderPath to POSIX path of (path to home folder as string) | |
set screenshotStoragePath to homeFolderPath & "Pictures/Screenshots/" | |
tell application "System Events" | |
if (not (exists folder screenshotStoragePath)) then | |
tell application "Finder" | |
make new folder at (path to home folder as string) & "Pictures" with properties {name:"Screenshots"} | |
end tell | |
end if | |
end tell | |
-- save screenshot | |
repeat with shotcount from 1 to 100 | |
-- initialize storage location to be used for screenshot | |
set timeStamp to do shell script "date '+%Y-%m-%d at %I.%M.%S %p'" | |
set screenshotFilePath to screenshotStoragePath & "Screen Shots " & timeStamp & " Monitor 1.png" | |
set screenshotFilePath2 to screenshotStoragePath & "Screen Shots " & timeStamp & " Monitor 2.png" | |
do shell script "screencapture" & " " & quoted form of screenshotFilePath & " " & quoted form of screenshotFilePath2 | |
delay (60 * 2) -- 2 minutes | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment