----- Original Message ----- From: "Matthew Ryan" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, November 14, 2005 9:37 PM
Subject: RE: WinPhoto


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;

Thank you very, very, very much. This way look walkable :-) I'm going to install Win32::GuiTest and Win32::Clipboard and to study them.

Petr Vileta, Czech republic
(My server reject all messages from Yahoo and Hotmail. Send me your mail from another non-spammer site please.)


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to