juo has asked for the wisdom of the Perl Monks concerning the following question:
I was wondering if their is an easy way to know if a Windows application is up and running or not. When I use Win32 to launch an executable the Perl script will continue after that which is ok, however some code in it will communicate with the application and if the application is not completely running it will fail. A way to get around that was by using sleep(4), but this is so dirty, because on some systems it take 3 seconds to launch, on others longer and if launched second time it only take 1 second, so the script would be all the time waiting for nothing. Is their a way to let the script wait untill the application is fully up and running.
Win32::Process::Create($get,$GENESIS_EDIR.'\\get\\get.exe',"get -a$p +ort",0,CREATE_NEW_CONSOLE,".")|| die ErrorReport();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to know if an application is completely launched
by PodMaster (Abbot) on Oct 04, 2004 at 12:47 UTC | |
by juo (Curate) on Oct 05, 2004 at 13:24 UTC |