pwn4g3 Posted April 25, 2007 Share Posted April 25, 2007 An AutoIt script is used to handle an installer. At a certain point during the installation process two different windows may pop up. From your experience or mere immeasurable wisdom; what is the best way to code? 1. Use two WinWaitActive statements with timeouts within any kind of loop. Decide by the return value which programm branch to handle. 2. Use WinList and pick the right window. Again, use a loop with a timeout to allow the window to pop up. 3. Use WinWaitActive with a RegExp. Upon a match, check the window title with an If Then Else. 4. Something completly different. Link to comment Share on other sites More sharing options...
Gabburd Posted April 25, 2007 Share Posted April 25, 2007 Try this: While 1 Select Case WinActive( "Title of window 1" ) ;Do something ExitLoop ;Stop checking for an active window Case WinActive( "Title of window 2" ) ;Do something else ExitLoop ;Stop checking for an active window Case Else ;If neither is active yet, do this EndSelect Sleep(200) ; So that the CPU doesn't get hogged WEnd 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