Jump to content

pause on window change?


savage29
 Share

Recommended Posts

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
Link to comment
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?

Link to comment
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.

Link to comment
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", "")

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...