• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detecting in/activity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Detecting in/activity (From: Jacob Bandes-Storch <email@hidden>)

  • Prev by Date: Re: a newbie question
  • Next by Date: Re: Distributed Objects invocation dispatch not thread safe??
  • Previous by thread: Detecting in/activity
  • Next by thread: Remove '\n' char from NSString
  • Index(es):
    • Date
    • Thread