A few years ago I created a very small app using Flash and a product called Zinc (it used to be reasonably priced). The app could use a Zinc command that gave me a list of all open windows in the system, and tell me the system's window ID for the current one in focus. I then had my own, basic actionscript timer that would time how long the window was in focus, then reset the timer and start over when another program window was opened, launched or alt-tabbbed/cmmnd-tabbed into focus.
This app did not just track it's own windows but ALL windows from any other application in the system, browser tab windows, multiple windows opened up in photoshop, and anything else you could open on the system. I used it as a simple timer to help track how long I was really spending on projects vs. say, my browser's gmail window (very useful!).
If it's not a single function, any script ideas on how I would achieve this in my AIR app?
Thanks for your time in considering a solution,