on 2008-09-18 7:03 AM, Memo Akten at [EMAIL PROTECTED] wrote: > In my app I'd like to check for system idle time, and perform an > action after a set amount of time. I've found this code to check for > system idle time > http://www.cocoabuilder.com/archive/message/cocoa/2004/10/27/120354 > > is this still the best way to do it on leopard?
Look at the Quartz Event Services Reference document and the CGEventSourceSecondsSinceLastEventType function. Pass kCGAnyInputEventType in the eventType parameter to get the seconds since the last event of any type. For most purposes, the source parameter value should be an event source created using kCGEventSourceStateCombinedSessionState. I believe this is available and documented for Tiger and Leopard. -- Bill Cheeseman - [EMAIL PROTECTED] Quechee Software, Quechee, Vermont, USA www.quecheesoftware.com PreFab Software - www.prefabsoftware.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]