Skip to content

Instantly share code, notes, and snippets.

@toricls
Created June 29, 2021 01:15
Show Gist options
  • Save toricls/0db03542ce49af4631db28447ac255d2 to your computer and use it in GitHub Desktop.
Save toricls/0db03542ce49af4631db28447ac255d2 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