Skip to content

Instantly share code, notes, and snippets.

@tstone2077
tstone2077 / WinDetectSystemIdle.py
Created February 23, 2011 08:03
This is a little class wrapper to detect if the system is idle on a windows system.
import platform
import threading
import time
if platform.system() == "Windows":
import ctypes, ctypes.wintypes
# http://msdn.microsoft.com/en-us/library/ms646272(VS.85).aspx
# typedef struct tagLASTINPUTINFO {
# UINT cbSize;