Created
February 15, 2021 22:32
-
-
Save burturt/0f31f2e2e83d5bc4a8fa94c67b4aaf10 to your computer and use it in GitHub Desktop.
MacOS - takes a repeated screenshot of area and clicks a location between screenshots.
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
#!/bin/bash | |
ITERATION=0 | |
while : | |
do | |
screencapture -R 1,1,100,100 -x screenshot-$ITERATION.png | |
# Get the coordinates for -R using command - shift - 4. First 2 numbers when at one corner then last 2 numbers when dragging over area | |
ITERATION=$(($ITERATION+1)) | |
echo "picture $ITERATION taken" | |
osascript -e 'tell application "System Events" | |
click at {1,100} | |
end tell' | |
# Use cmd-shift-4 to get exact location | |
sleep 1 | |
done | |
# NOTE: will run forever, so don't leave sitting forever! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment