It's often helpful if you can give a runnable sample of you code that exhibits the problem. The following is based on your sample and runs as expected on my system:
use strict; use warnings; use Tk; use Win32::Clipboard; use Win32::Process; $::CLIP = Win32::Clipboard(); my $ProcessObj; Win32::Process::Create($ProcessObj, 'c:\Windows\system32\notepad.exe', "notepad", 0, NORMAL_PRIORITY_CLASS, ".") || die "Can't create"; my $emptytries = 0; my $clip; while (1) { $clip = Win32::Clipboard::GetText(); if ($clip) { print "$clip\n\n"; $::CLIP->Empty(); $emptytries = 0; sleep(5); } else { $emptytries++; last if ($emptytries >= 3); print "."; sleep(1); } } $ProcessObj->Wait(INFINITE); print "Done";
Prints:
asddf ..Done
In reply to Re: Win32::Process not waiting
by GrandFather
in thread Win32::Process not waiting
by Stephen Toney
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |