MACSCRPT Archives

November 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Lively <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 30 Nov 2007 15:02:44 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (22 lines)
On Nov 30, 2007, at 2:12 PM, Stockly, Ed wrote:

> Is there a shell command that will return how much time has passed  
> since the
> last time a user moved or clicked the mouse or hit a key on the  
> keyboard?
>
> ES
>


A little Google-fu led me to this charm.

ioreg -n IOPower -l |grep -i idle

It gives idles for various devices.  They seem to be in order of last  
use but that might not always be the case.  Time is expressed in 10^-9  
seconds!  They claim it works in panther.  I know it works in leopard.

-Mark
Who remembers life before google;  We used this list.

ATOM RSS1 RSS2