If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Does anyone know how to find how long a user has been idle for? I have an app, which after a period of idle time, I want it to do something. If anyone has any suggestions they would be appreciated.
Originally posted by macrophyllum:
<STRONG>Does anyone know how to find how long a user has been idle for? I have an app, which after a period of idle time, I want it to do something. If anyone has any suggestions they would be appreciated.</STRONG>
Define "idle." No mouse movement? No keyboard action? No network data? If idle is defined as no input from know sources (keyboard and mouse) then you could probably just put some listener which watches NSEvents and runs in a timer. You may have to do some trickery with a floating window always be topmost to get events. To do it as a faceless entity, you'll probably have to dive into Carbon to watch it at a low level and then message your app that some time/idleness threshold has been crossed.