Created
April 19, 2020 15:24
-
-
Save sydneyitguy/4f163ecf557fff78d74f29bed7e9725a to your computer and use it in GitHub Desktop.
Refresh Chrome every 120 seconds and take screenshot
This file contains hidden or 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/sh | |
exec <"$0" || exit; read v; read v; exec /usr/bin/osascript - "$@"; exit | |
# The line above allows the rest of the file to be written in plain AppleScript. | |
repeat 99999999 times | |
tell application "Google Chrome" | |
activate | |
tell application "System Events" | |
tell process "Google Chrome" | |
keystroke "r" using {command down, shift down} | |
end tell | |
end tell | |
end tell | |
delay 10 | |
do shell script ("screencapture ~/Desktop/$(date +%Y-%m-%dT%H%M).png") | |
delay 120 | |
end | |
tell application "Terminal" to activate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment