Skip to content

Instantly share code, notes, and snippets.

@brentley
Forked from toricls/screenshots.applescript
Created June 29, 2021 14:21
Show Gist options
  • Save brentley/2631b3387c0c0ee45b37fae1729eea83 to your computer and use it in GitHub Desktop.
Save brentley/2631b3387c0c0ee45b37fae1729eea83 to your computer and use it in GitHub Desktop.
Take screenshots with consistent size and location with AppleScript in Automator.app
set theDate to do shell script "date +%Y_%m_%d_%H%M%S"
set theDirectory to POSIX path of (path to desktop)
set thePath to theDirectory & "screenCapture_" & theDate & ".png"
# -R557,308,810,513 is the rectangle option: x,y,w,h
do shell script "screencapture -R557,308,810,513 -tpng" & space & quoted form of thePath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment