Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Screenshot

by Anonymous Monk
on Jun 20, 2005 at 06:24 UTC ( [id://468230]=CUFP: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://468230]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2026-04-17 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.