Re: Detecting in/activity
Re: Detecting in/activity
- Subject: Re: Detecting in/activity
- From: "Michael Ash" <email@hidden>
- Date: Sat, 15 Nov 2008 20:07:04 -0500
On Sat, Nov 15, 2008 at 5:43 PM, Jacob Bandes-Storch <email@hidden> wrote:
> Hi all,
>
> I'd like to have an app/daemon/something detect when the computer becomes
> active after a period of inactivity, much like iChat does when it says
> "Welcome back! Would you like to change your status from ...". Does anyone
> have any insight as to the best way to do that?
This mailing list post has code which illustrates how to get the
current system idle time from IOKit:
http://www.cocoabuilder.com/archive/message/cocoa/2004/10/27/120354
And the bottom of this page outlines how you could then use that
information to build a timer which will trigger after a set amount of
idle time has occurred:
http://www.cocoadev.com/index.pl?GettingSystemIdleTime
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden