ok i got bored and wanted to learn perl, so heres what i got. simply made a lil script for the command "import" that asks for a filename, location to put it, and extenstion.
#!/usr/bin/perl print "What Shouls We Name It? "; my $name = <STDIN>; chomp($name); print "Wheres It Going? "; my $path = <STDIN>; chomp($path); print "File Type (jpg, gif, png, bmp)? "; my $ext = <STDIN>; chomp($ext); exec "import -window root $path/$name.$ext\n";

Replies are listed 'Best First'.
Re: Screenshot
by aukjan (Friar) on Jun 20, 2005 at 06:54 UTC
    Just as a side note... Windows users might try Win32::Screenshot. (never used it myself though)

    .:| If it can't be fixed .. Don't break it |:.

      Using an X server under a *NIX system, you can grab the screenshot directly from perl by using:

      $image->Read(filename=>"X:", display=>$DISPLAY, geometry=>$geometry); #not tested
      i guess, im not a windows user so i didnt bother. ill keep that in mind tho as im still learning perl
Re: Screenshot
by merlyn (Sage) on Jun 20, 2005 at 16:12 UTC