A Perl script to automate screen captures
Sep 04, '02 10:18:36AM
Contributed by: Dark Paladin
Here's a little perl script I came up with:
#!/usr/bin/perl
number = "00000";
while(1)
{
$newfile = $number.".jpg";
sleep 10;
`screencapture -m -x ~/Documents/$newfile`;
$number++;
}
What does it do? Simple - it takes a screenshot every 10 seconds and saves it as a .jpg file. I've double checked this in Graphics Converter - it is a .jpg file. I do have Quicktime 6 Pro, so your mileage may vary.
From here, you can tweak this program to your liking. For guys like me who do DVD/game reviews, this is handy so we don't have to reach for the Command-Shift-3 key all day long (especially when that's disabled during a DVD movie).
[Editor's note: Standard shell script stuff - Save the file, make it executable with chmod 755 script_name and make sure it's saved somewhere in your path...]
Comments (15)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020904071836953