>>>> Petr Vileta <> wrote:
>>>>> Is here anybody who know where to get Tk::WinPhoto module for perl
>>>>> 5.6.1.638 on Windows-XP? I'm searching 3 days without success :-(
>>>>>
>>
>> I have Tk::photo with the TK module for windows in ppm distro from
>> Activestate. I have windows xp box with perl 5.8.7 build 813.
>> Is this a module that you could use?
>No, Tk::WinPhoto create the image as a "printscreen" of Canvas.
Ok I found this on use.perl.org >
use strict;
use Win32::Clipboard;
use Win32::GuiTest qw(FindWindowLike SetForegroundWindow SendKeys);
# Find an open Window
my @windows = FindWindowLike(0, qr/Command/);
# Bring Word to the foreground (with focus)
for (@windows) {
SetForegroundWindow($_);
SendKeys('%{PRTSCR}'); # Alt Print Screen
}
# 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;
HTH
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs