Patrick Li wrote:
Hi, Does anyone know how I can detect if a system is idle? By idle I am referring to a user being away from the computer (no keyboard or mouse movement) for X minutes. Tried searching around but I haven't found anything that mentions how I can hook into these two events.
I knew there had been some discussion about this in the past, but my attempts at searching the archives were frustrated by the huge number of posts about "IDLE"! In short: you can use the Scheduled Tasks API to trigger something when the system has been idle for x minutes: http://mail.python.org/pipermail/python-list/2005-May/323848.html Alternatively, the GetLastInputInfo API might be what you want: http://msdn.microsoft.com/en-us/library/ms646302(VS.85).aspx TJG _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32