Created
May 19, 2023 22:30
-
-
Save chrisbodhi/f8f038e2978f945a05210d76c1bc4281 to your computer and use it in GitHub Desktop.
Work with the garage door up: this script snapshots your entire desktop through the day, and then stitches the images together into a gif
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
--Requires ImageMagick | |
-- Set up the variables | |
set screenshotFolder to "/Users/YR_NAME/Desktop/Screenshots" -- Change this to whatever folder you'd like to save the screenshots in | |
set screenshotInterval to 600 -- Change this to the number of seconds between each screenshot | |
set screenshotCount to 30 -- Change this to the number of screenshots you'd like to take | |
-- Take the screenshots | |
delay screenshotInterval | |
repeat with i from 1 to screenshotCount | |
set screenshotName to "screenshot" & i & ".png" | |
set screenshotPath to screenshotFolder & "/" & screenshotName -- corrected file path | |
do shell script "screencapture -x " & quoted form of screenshotPath | |
delay screenshotInterval | |
end repeat | |
-- Combine the screenshots into a gif | |
set gifName to "screenshot.gif" | |
set gifPath to screenshotFolder & gifName | |
do shell script "cd " & quoted form of screenshotFolder & "; /opt/homebrew/bin/convert -delay 100 -loop 0 screenshot*.png " & quoted form of gifName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment