On Sat, Nov 15, 2008 at 5:43 PM, Jacob Bandes-Storch <jtbandes...> 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/120354And 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?GettingSystemIdleTimeMike