Latest in Hacks

Image credit:

Timed command-line screenshots

Share
Tweet
Share
Save

Sponsored Links

A TUAW staffer recently asked if there were a way to snapshot the exact same region of the screen over and over at timed intervals without buying third-party software.

There is, but it depends on your comfort with the command line. If you're experienced in Unix scripting, read on. If not, you may want to investigate standalone screen-capture apps instead.

I pointed him to /usr/sbin/screencapture. This built-in OS X utility allows you to specify a screen region to capture. For example, to capture a 50x200 rectangle starting at the point 200, 200, you'd say:
% /usr/sbin/screencapture -R"200,200,50,200" ~/Desktop/foo.png
You can easily apply a Unix shell script to create numbered output files. Unix commands will also enable you to sleep and repeat the capture requests over time.

The utility is Retina-ready. Since it captures in points (and not pixels), the results are twice as big in each dimension when run on Retina systems.

All products recommended by Engadget are selected by our editorial team, independent of our parent company. Some of our stories include affiliate links. If you buy something through one of these links, we may earn an affiliate commission.
Comment
Comments
Share
Tweet
Share
Save

Popular on Engadget

Engadget’s guide to Home Entertainment

Engadget’s guide to Home Entertainment

View
The Panama Papers lawyers want to stop Netflix’s ‘The Laundromat’

The Panama Papers lawyers want to stop Netflix’s ‘The Laundromat’

View
Oppo’s Reno 2 has a 'sharkfin' pop-up camera and decent zoom on the cheap

Oppo’s Reno 2 has a 'sharkfin' pop-up camera and decent zoom on the cheap

View
Analogue's $200 Pocket could be the ultimate retro gaming portable

Analogue's $200 Pocket could be the ultimate retro gaming portable

View
Ang Lee chases cinema’s 120FPS future with ‘Gemini Man’

Ang Lee chases cinema’s 120FPS future with ‘Gemini Man’

View

From around the web

Page 1Page 1ear iconeye iconFill 23text filevr