jw102788 Posted October 6, 2009 Posted October 6, 2009 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 Jos Posted October 6, 2009 Developers Posted October 6, 2009 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.
PsaltyDS Posted October 6, 2009 Posted October 6, 2009 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now