inactive mouse apple script?

Discussion in 'Mac Programming' started by wfs123, Jun 14, 2011.

  1. wfs123 macrumors newbie

    Mar 28, 2011
    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
  2. chown33 macrumors 604

    Aug 9, 2009
    on the Western Slopes, with E. A. Poe
    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.

Share This Page