Jump to content
Sign in to follow this  
jw102788

WinWaitActive question

Recommended Posts

jw102788

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?

Share this post


Link to post
Share on other sites
Jos

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
PsaltyDS

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.