Jump to content

Recommended Posts

Posted

I wanted to a script to wait for any window to open and then if that window is one of the windows i'm looking for have it perform a particular aciton.

It's easy enogh with one window, but i dont want a different script for every window that i want to deal with.

While 1
    WinWait ( 'Alert' )
    WinClose ( 'Alert' )
WEnd
Posted (edited)

<3

1 quick question. will this be pretty nasty for resources? Is there any way to trigger it to just do the select when a new window appears?

Edited by Swimming_Bird
Posted

You are going to need code to check if a new window does appear which will eat resources anyway, so you will not evade the checking. A Sleep of 1 second should not be a problem. If you have a lot of windows then perhaps using the Regular expression option 4 in a Win* function may provide more effective saving of resources and proceed with the Select statement only if the condition is true.

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
  • Recently Browsing   0 members

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