in reply to Win32::Clipboard dying?
Have you tried calling GetBitmap() as a instance method rather than a class method:$image = $clip->GetBitmap() or die .. ;
Have you tried: $clip->WaitForChange(); prior to GetBitmap()?
Have you tried undefing and re-creating the clipboard object when a failure occurs?
RETRY: my $tries = 0; my $image = $clip->GetBitmap() or do { undef $clip; $clip = Win32::Clipboard->new(); goto RETRY unless ++$retries > 5; } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Win32::Clipboard dying?
by manish.rana@me.com (Initiate) on May 20, 2016 at 00:18 UTC | |
|
Re^2: Win32::Clipboard dying?
by manish.rana@me.com (Initiate) on May 20, 2016 at 00:25 UTC | |
by BrowserUk (Patriarch) on May 20, 2016 at 00:41 UTC |