in reply to How to know if an application is completely launched

It really depends on what you mean by fully up and running, but if you control both applications, what you want to do is use Win32::Event objects. That way you sleep only until your new process is up and running (until it sends you a signal). Another approach is to sleep until a certain file/directory is created
select undef, undef, undef, 0.5 while ! -e '/file/get.exe/will/create/once/its/fully/up/and/runnin +g';
If you don't control get.exe, well then the application may be fully up and running when it creates a window, so you just sleep until you can find a window for get.exe.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re^2: How to know if an application is completely launched
by juo (Curate) on Oct 05, 2004 at 13:24 UTC

    Thanks for the hint, that was all I need. I knew their is some function to get all the active windows and checking those windows does the job. Works very nice. Below my code for reference

    # Used to focus windows on the top use Win32::GuiTest qw(FindWindowLike GetWindowText SetForegroundWindow SendKeys); while ($found == 0) { $found = FindWindowLike(0, 'Engineering Toolkit', ""); sleep (4); print "Application is still starting Wait .........\n"; }