Jump to content
Sign in to follow this  

Question About WinWaitActive

Recommended Posts


Here is my question:

I have been working with installing & running programs using a combination of Winwaitactive, and Controlclick.

The problem I am seeing is if I have a Fork in the road (IE. I have more than one possible window that could become active) depending on what the results of my application is.

Is there a way to make a control statement for winwaitactive?

For Example: Note this code has not been checked for syntax

If winwaitactive("Application Run","Scan Results - Good") Then
Do the following


If winwaitactive("Application Run","Scan Results - Bad") Then

Do the following


I just need to figure out a way to control the winwaitactives based on possibly different windows that may pop up at a given time based on program execution.

thanks everyone :(

Share this post

Link to post
Share on other sites

What you would have to do next is something along these lines:

Local $NewWindow = WinWaitActive ("Application Run","Scan Results", $someTimeout)
If Not $NewWindow Then
    <Do something to let yourself know it timed out>

Local $textToCheck = WinGetText ($NewWindow)

If StringInStr ($textToCheck, "Good") Then

If there is no common text between the windows, this post might help.

Edited by Fulano

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

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