See the full example at the linked node but here is the shorter version.
#!/usr/bin/perl -w use strict; use Win32::Clipboard; use Win32::GuiTest 'SendKeys'; # Send "Print Screen" key to Windows. SendKeys('{PRTSCR}'); # Get the image from the clipboard. my $screen = Win32::Clipboard::GetBitmap() or die "No image captured: $!\n"; # Print the image to a file. open BITMAP, "> screen.bmp" or die "Couldn't open bitmap file: +$!\n"; binmode BITMAP; print BITMAP $screen; close BITMAP; __END__
--
John.
In reply to Re: screenshot module on Windows
by jmcnamara
in thread screenshot module on Windows
by spx2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |