Hello,

I am hunting some phantom bug here which involves Win32::Clipboard's 
WaitforChange() on Windows Vista. The statement just sits there waiting for a 
timeout to occur after the first call.

I have narrowed it down to the snippet below.

Perl 5.8.8. Any hints appreciated.

Thanks
Björn

---

#!C:/Perl/bin/Perl -w

require Win32::API;
require Win32::Clipboard;

$|=1;

my $key = new Win32::API("user32", "keybd_event", 'IINP', 'V');
die "Can't import user32.dll: $!\n" if(not defined $key);

my $clip = new Win32::Clipboard;

while(1) {

$clip->Empty();

        print ".";
        sleep(2);

$key->Call(0x2C, 0x45, 0x01, 0); #press printscreen
$key->Call(0x2C, 0x45, 0x03, 0); #release printscreen

$clip->WaitForChange();

my $image = $clip->GetBitmap();
open (BITMAP, ">test.bmp");
binmode BITMAP;
print BITMAP $image;
close(BITMAP);

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

Reply via email to