Jump to content

Script to wait for particular windows to open

Recommended Posts

Just use a Select Case block inside a loop to handle more then 1 window of choice.

While 1
        Case WinExists('title 1')
            WinClose('title 1')
        Case WinExists('title 2')
            WinClose('title 2')
        Case WinExists('title 3')
            WinClose('title 3')


Link to comment
Share on other sites

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.

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

  • Recently Browsing   0 members

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