PDA

View Full Version : [all variants] programmatically detecting when I switch between windows



aresnick
November 30th, 2008, 09:07 PM
Hi! I'm looking to write a script which monitors and logs my computer usage. As part of that, I'd like to keep track of how long I spend in each application, and take a screenshot periodically, including when I switch between windows. I was wondering if someone might be able to point me in the right direction to find where I could read up on how to do this (preferably with a Python script)?

In particular, I'm looking to find out where I can learn about hooks into the window manager so that I can keep track of how long and which windows are active. . .Information like which website I'm on would also be great to have access to, although I assume that's something I should be looking on Firefox forums for.

Thanks a bunch!