Jump to content
Sign in to follow this  

[RESOLVED] Waiting until an Invisible window is active

Recommended Posts



My problem is this, I am writing an automation script for an application. When I launch the application, a splash screen is displayed, and the main window is running, but invisible and not active.

The main window only becomes active after the splash screen, (which has a progress bar and is just there to hide the fact that the application is really slow!), has been closed. The splash screen has no title and I cannot get the source of it, it also has the same process name as the application.

Therefore, I cannot be sure when my application opens, so I don't know when to start sending commands to it. I don't want to resort to using Sleep() statements as this is an unreliable method.

I can't use WinWaitActive() or WinWait(), as these will return immediately because as I expalined above the window is active, but invisible.

If any further clarification on the problem is needed, just ask.

Does anyone have any suggestions?



Edited by jbc1

Share this post

Link to post
Share on other sites

Check out WinGetState().

Pop it into a loop and you should be good to go.

Share this post

Link to post
Share on other sites

What is the application? this could help us I guess...

Also this code could help you out, Just check through each of these message boxes untill you find your window :mellow:

$list = Winlist()
MsgBox(0,"Amount of 'Windows'","There are "&$list[0][0]&" windows open! (Hidden or Visible)")
For $a = 1 to $list[0][0]
    MsgBox(0,"Window Number " &$a,"$list[$a][0])

I could make it more advanced adding a question like is this the desired window with yes and no option, then if it is the desired window, set state to visible. But I am in a hurry now ;-) if you still need this when I wake up tomorrow, I'll gladly write that real quick :(

[right]~What can I say, I'm a Simplistic person[/right]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.