View Full Version : inactive mouse apple script?

Jun 14, 2011, 05:01 PM
im working on a applescript where i need it to tell how long its been since i touched the trackpad. basically it has to tell when i last touched the mouse count down from 60 seconds then run a command which is all ready... i just cant figure out the inactive trackpad and time part.

thanks, will

Jun 14, 2011, 06:54 PM
The usual approach is to measure idle time since any user input devices, not just a mouse or trackpad. For that, try these google search terms:
HIDIdleTime ioreg awk script

There are plenty of scripting articles, forums, and similar questions around that use an idiomatic shell script based on the ioreg and awk commands.

If you're adamant about trackpad only, you'll probably have to do some exploring of the I/O device registry using the 'ioreg' command.