Jump to content

Recommended Posts

Posted

Hello. I have a quick question. Is it possible to use the WinWaitActive command to detect an active window in general, instead of a specific one? For example, lets say I click on a link, and a window pops-up, but depending on the conditions at the time, a different window with a different title would pop-up. Could the WinWaitActive command be used to detect the active pop-up window, no matter what its title is?

  • Developers
Posted

Not sure how a WinWaitActive() could wait for an window without telling it what it is.

You could check the window that currently has the focus in a loop with the Win????() functions.

How would you know that the window is the correct one?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

Maybe run WinList() in a loop waiting for the number of windows to go up? A compare of the arrays before/after could give you the title and handle of the new window. This makes a big assumption that this is only new window that will occur.

There are probably ways to hook an event when a new window is created, but I think that's more advanced than you want.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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...