Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Perl

Journal The Great Wakka's Journal: screen.pl: auto-screenshot taker

#! /usr/bin/perl

use strict;

my $filenamenotfound=0;
my $filenum_=0;
my $ssdir="$ENV{HOME}/images";

if (-e "$ENV{HOME}/.screenshotrc"){
        open (RC, "$ENV{HOME}/.screenshotrc") ||
                die ".screenshotrc found, but cannot open!\n";
        while ([RC]){
                $ssdir=$_;
        }
} else {
        print "Cannot find .screenshotrc, using default ~/images directory...\n";
}

while (-e "$ssdir/screen$filenum_.jpg"){
        $filenum_++;
}

system ("import -window root $ssdir/screen$filenum_.jpg");

Written with vim and Linux
Replace all [] with pointy brackets.

This discussion has been archived. No new comments can be posted.

screen.pl: auto-screenshot taker

Comments Filter:

You mean you didn't *know* she was off making lots of little phone companies?

Working...