Stephen Toney has asked for the wisdom of the Perl Monks concerning the following question:
Many thanks in advance for any advice!use Tk; use Win32::Clipboard; use Win32::Process; $::CLIP = Win32::Clipboard(); # lots of code here Win32::Process::Create($ProcessObj, "d:\\mwa\\perlpps\\mwebprep.exe", "mwebprep $step", 0, NORMAL_PRIORITY_CLASS, ".") || die Win32ProcessError(); my $emptytries = 0; my $clip; while (1) { $clip = Win32::Clipboard::GetText(); if ($clip) { $::progresstext->insert('end', $clip . "\n"); $::progresstext->yview('moveto', 100); $::mainwin->update; $::CLIP->Empty(); $emptytries = 0; sleep(5); } else { $emptytries++; last if ($emptytries >= 3); sleep(1); } } $ProcessObj->Wait(INFINITE); # more code
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::Process not waiting
by GrandFather (Saint) on Feb 15, 2007 at 19:40 UTC | |
by Stephen Toney (Sexton) on Feb 15, 2007 at 21:27 UTC | |
by GrandFather (Saint) on Feb 15, 2007 at 21:56 UTC | |
|
Re: Win32::Process not waiting
by ikegami (Patriarch) on Feb 15, 2007 at 18:18 UTC | |
by Stephen Toney (Sexton) on Feb 15, 2007 at 18:37 UTC | |
by ikegami (Patriarch) on Feb 15, 2007 at 18:42 UTC | |
|
Re: Win32::Process not waiting
by ikegami (Patriarch) on Feb 15, 2007 at 16:11 UTC | |
by Stephen Toney (Sexton) on Feb 15, 2007 at 16:24 UTC | |
by ikegami (Patriarch) on Feb 15, 2007 at 16:27 UTC | |
by Stephen Toney (Sexton) on Feb 15, 2007 at 16:57 UTC | |
by Stephen Toney (Sexton) on Feb 15, 2007 at 18:00 UTC | |
|
Re: Win32::Process not waiting
by zentara (Cardinal) on Feb 16, 2007 at 12:52 UTC |