Active Window for Application Log
Posted: Thu Dec 23, 2004 11:51 am
I'm trying to create a RoboTask to create a log of each application used and for how long. It is enough to create a file with Date, Time and Window Name of the active window over time.
I set up a window loop every 5 secs or so to look at each window and then ask if it is active. This seems like too much work for a simple thing. It actually takes more than 5 secs to loop through them all.
It would seem natural to have a system variable that returns the name (handle, etc.) of the then active window. It would also seem natural to have a window watch type trigger event that fires when the state of the active window changes.
Using the new window trigger and new active window name variable, I can trap the deactivation of the active window, look what is active now, and log it along with the date and time.
Have I missed these or is there some simpler way to do what I want?
Thank you in advance.
Great utility!!
I set up a window loop every 5 secs or so to look at each window and then ask if it is active. This seems like too much work for a simple thing. It actually takes more than 5 secs to loop through them all.
It would seem natural to have a system variable that returns the name (handle, etc.) of the then active window. It would also seem natural to have a window watch type trigger event that fires when the state of the active window changes.
Using the new window trigger and new active window name variable, I can trap the deactivation of the active window, look what is active now, and log it along with the date and time.
Have I missed these or is there some simpler way to do what I want?
Thank you in advance.
Great utility!!