in reply to screenshot module on Windows


It would be best to use one of the dedicated modules but in the absence of those the following simple utility might do what you need: Screen capture on Windows.

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.