When manual screenshots aren't enough
Taking screenshots by hand works fine for one-off captures. But some workflows need screenshots on a schedule or in bulk: monitoring a dashboard every hour, capturing app states during QA testing, creating time-lapse documentation of a design process, or generating App Store screenshots across multiple screen sizes.
macOS has several built-in tools for automating screenshots. None of them are obvious, and most require some setup. Here's how to use each one.
Method 1: The screencapture command in Terminal
The screencapture command is the foundation of all Mac screenshot automation. Every other method on this page ultimately calls it. Understanding it directly gives you the most control.
Take a screenshot of the full screen:
screencapture ~/Desktop/screenshot.png
Capture a specific screen region (x,y,width,height):
screencapture -R 0,0,1280,800 ~/Desktop/region.png
Capture a specific window by title using AppleScript to get the window ID:
screencapture -l $(osascript -e 'tell app "Safari" to id of window 1') ~/Desktop/safari.png
Add a timestamp to the filename so captures don't overwrite each other:
screencapture ~/Desktop/screenshot-$(date +%Y%m%d-%H%M%S).png
For a complete reference of screencapture flags, see our Terminal screencapture command guide.
Method 2: Scheduled screenshots with launchd
To take screenshots on a recurring schedule — every 5 minutes, every hour, once a day — you need launchd, the macOS system scheduler. It's like cron but native to macOS.
Create a plist file that takes a screenshot every 5 minutes:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.scheduled-screenshot</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>screencapture ~/Desktop/auto-screenshots/capture-$(date +\%Y\%m\%d-\%H\%M\%S).png</string>
</array>
<key>StartInterval</key>
<integer>300</integer>
</dict>
</plist>
Save this as ~/Library/LaunchAgents/com.user.scheduled-screenshot.plist, create the output directory, and load it:
mkdir -p ~/Desktop/auto-screenshots
launchctl load ~/Library/LaunchAgents/com.user.scheduled-screenshot.plist
To stop the scheduled captures:
launchctl unload ~/Library/LaunchAgents/com.user.scheduled-screenshot.plist
Change the StartInterval value to control frequency: 60 for every minute, 3600 for every hour, 86400 for once per day.
Method 3: Mac Shortcuts app
The Shortcuts app (macOS Monterey and later) provides a visual way to build screenshot automation without writing code. It includes a built-in "Take Screenshot" action.
To create a basic screenshot shortcut:
- Open the Shortcuts app
- Click the + button to create a new shortcut
- Search for "Take Screenshot" and add it
- Add a "Save File" action and set the destination folder
- Optional: add a "Rename File" action to include a timestamp
The Shortcuts approach is best for workflows that combine screenshots with other actions: take a screenshot, resize it, add a watermark, then upload to a specific folder. Each step is a visual block you can chain together.
To run a Shortcut on a schedule, you can use Shortcuts Automations (limited options) or trigger it from a launchd plist using the shortcuts run command:
shortcuts run "My Screenshot Shortcut"
Method 4: Automator for batch workflows
Automator is older than Shortcuts but handles batch operations better. It's especially useful for processing a folder of existing screenshots: renaming, resizing, converting formats, or adding watermarks to many files at once.
Create an Automator workflow to resize all screenshots in a folder:
- Open Automator and choose "Workflow"
- Add "Get Specified Finder Items" and select your screenshots folder
- Add "Get Folder Contents"
- Add "Scale Images" and set your target width
- Run the workflow
For automated processing of new screenshots, create a "Folder Action" instead of a Workflow. Attach it to your screenshots folder, and Automator will process every new file that appears there. This is how you build an automatic post-capture pipeline: every screenshot you take gets resized, renamed, and moved to the right folder without any manual intervention.
Method 5: AppleScript for app-specific captures
When you need to capture a specific app in a specific state, AppleScript lets you control the app first, then take the screenshot. This is essential for generating App Store screenshots or documentation images where the app needs to be in a particular view.
tell application "Safari"
activate
tell window 1
set bounds to {0, 0, 1280, 800}
end tell
delay 1
end tell
do shell script "screencapture -l " & (id of window 1 of application "Safari") & " ~/Desktop/safari-capture.png"
You can extend this pattern to open specific URLs, navigate to specific tabs, or set up any application state before capturing. For QA testing, loop through a list of URLs and capture each one automatically.
Combining methods: a complete automation pipeline
The most powerful setup combines Terminal scripts with launchd for scheduling and Folder Actions for post-processing. Here's a practical example that takes hourly dashboard screenshots, resizes them, and organizes by date:
#!/bin/bash
# save as ~/scripts/dashboard-capture.sh
FOLDER=~/Documents/dashboard-captures/$(date +%Y-%m-%d)
mkdir -p "$FOLDER"
# Capture the full screen
screencapture "$FOLDER/dashboard-$(date +%H%M).png"
# Resize to 50% using sips (built into macOS)
sips --resampleWidth 960 "$FOLDER/dashboard-$(date +%H%M).png"
# Delete captures older than 30 days
find ~/Documents/dashboard-captures -type f -mtime +30 -delete
Make it executable and schedule with launchd:
chmod +x ~/scripts/dashboard-capture.sh
Then create a launchd plist that runs this script at the top of every hour during work hours, using a StartCalendarInterval instead of StartInterval for more precise scheduling.
Quick reference: which method to use
| Use case | Best method | Skill level |
|---|---|---|
| Timed captures (every N minutes) | screencapture + launchd | Intermediate |
| One-off batch processing | Automator workflow | Beginner |
| Auto-process new screenshots | Automator Folder Action | Beginner |
| Multi-step workflows with other apps | Shortcuts app | Beginner |
| App-specific state capture | AppleScript + screencapture | Intermediate |
| Full pipeline (capture + process + organize) | Shell script + launchd + sips | Advanced |
Limitations of automated screenshots
A few gotchas to be aware of. Screen recording permissions (System Settings > Privacy & Security > Screen Recording) must be granted to Terminal or whatever app is calling screencapture. Without this, your automated captures will either fail silently or produce blank images.
Automated screenshots also capture whatever is on screen, including notifications, dialog boxes, and your cursor. If you're generating documentation screenshots, use screencapture -C to hide the cursor, and enable Do Not Disturb during capture runs to avoid notifications photobombing your images.
Finally, automated screenshots at Retina resolution are large. A full-screen capture on a MacBook Pro is about 5–8 MB. If you're taking screenshots every minute, that's 400+ MB per hour. Build a cleanup step into your automation to prevent your disk from filling up.
Automation handles the capture. LazyScreenshots handles everything after — annotate, redact, and paste screenshots directly into any app. $29 one-time.
Try LazyScreenshots — $29 one-time