Sign in to follow this  
Followers 0
savage29

pause on window change?

7 posts in this topic

gday people, i've been wondering all day if putting WinWaitActive at the start of a endless loop will automatically

stop a script running when it doesnt detect the open window, like this

While 1     
    WinWaitActive("window", "", 5)
    
        loop
                
    WEnd

Share this post


Link to post
Share on other sites



I don't get the question. WinWaitActive() waits for a window to become active.

ummm ok. script starts, i click on the window i want active, it runs the loop. loop completes, goes back to winwaitactive.

at that point, will the script stop if the target window is not highlighted? is that clearer for you?

Share this post


Link to post
Share on other sites

If you do not supply a timeout for the WinWaitActive() function, then yes, the script will stop until the condition is met (Window becomes active). If the Window exists (or not) the script will continue to wait until that Window becomes active.

Share this post


Link to post
Share on other sites

If you do not supply a timeout for the WinWaitActive() function, then yes, the script will stop until the condition is met (Window becomes active). If the Window exists (or not) the script will continue to wait until that Window becomes active.

ok so for this line

WinWaitActive("window", "", 5)

do i change it to this?

WinWaitActive("window", "", 0)

or this?

WinWaitActive("window", "")

Share this post


Link to post
Share on other sites

Either way will work:

Preferred

WinWaitActive("window", "")
or
WinWaitActive("window", "", 0)

varian, you are my new goddess :P thank you for your help, its well appreciated :x

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  
Followers 0