http://qs321.pair.com?node_id=745253


in reply to Sense Mouse Movement?

BrowserUK provides a fully working example in Re^3: Win32 idle state (Updated), using Win32::API (or rather Win32::API::Prototype, but see my reply) to check when windows last registered any user input. If you need to know the current tick count you can use GetTickCount() in the Win32 module. Be aware of that the tick count wraps when it becomes too large, so you probably want check against that if you computer runs for more than 49 days.

lodin