jbc1 Posted November 20, 2008 Share Posted November 20, 2008 (edited) Hi, 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? Thanks, jbc1 Edited November 21, 2008 by jbc1 Link to comment Share on other sites More sharing options...
ResNullius Posted November 20, 2008 Share Posted November 20, 2008 Check out WinGetState().Pop it into a loop and you should be good to go. Link to comment Share on other sites More sharing options...
Bert Posted November 20, 2008 Share Posted November 20, 2008 You could also see if the app you are installing can use command line switches. If so, then the install is easy. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
toonboon Posted November 20, 2008 Share Posted November 20, 2008 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 $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]) Next 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] Link to comment Share on other sites More sharing options...
jbc1 Posted November 21, 2008 Author Share Posted November 21, 2008 WinGetState with a loop worked a treat, thanks all. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now