j***@hotmail.com
2010-10-04 18:11:32 UTC
Hi,
I've used the Win32::Clipboard module for quite some time, but I've
never been able to get the ::WaitForChange() method to work properly.
What I mean is, when I run the following program:
#!/usr/bin/perl
use strict;
use warnings;
$| = 1; # autoflush STDOUT
use Win32::Clipboard;
print "Waiting for change in clipboard...\n";
my $CLIP = Win32::Clipboard();
$CLIP->WaitForChange();
print "\nClipboard has changed!\n\n";
__END__
the program prints the messages and ends instantly, without ever
waiting for new content to be copied to the clipboard buffer.
If memory serves, I've encountered this problem on both ActiveState
perl 5.8 on Windows Vista, and now on Strawberry Perl 5.10 on Windows
7. (Also, $Win32::Clipboard::VERSION is 0.55 .)
So is the fact that ::WaitForChange() doesn't actually wait for a
change in the system clipboard a bug, or am I using it wrong? (And if
I'm using it wrong, what is the proper way to wait until the clipboard
has changed?)
Thanks,
-- Jean-Luc
I've used the Win32::Clipboard module for quite some time, but I've
never been able to get the ::WaitForChange() method to work properly.
What I mean is, when I run the following program:
#!/usr/bin/perl
use strict;
use warnings;
$| = 1; # autoflush STDOUT
use Win32::Clipboard;
print "Waiting for change in clipboard...\n";
my $CLIP = Win32::Clipboard();
$CLIP->WaitForChange();
print "\nClipboard has changed!\n\n";
__END__
the program prints the messages and ends instantly, without ever
waiting for new content to be copied to the clipboard buffer.
If memory serves, I've encountered this problem on both ActiveState
perl 5.8 on Windows Vista, and now on Strawberry Perl 5.10 on Windows
7. (Also, $Win32::Clipboard::VERSION is 0.55 .)
So is the fact that ::WaitForChange() doesn't actually wait for a
change in the system clipboard a bug, or am I using it wrong? (And if
I'm using it wrong, what is the proper way to wait until the clipboard
has changed?)
Thanks,
-- Jean-Luc