Monitoring System Idle Time 
Author Message
 Monitoring System Idle Time

OK, I have a problem.  I need to monitor the system idle time and do something
at a certain time period.  That is, if the user does not move the mouse or
press any keys for oh, say 15 minutes, then I need to do something.  I know
the system keeps track of the idle time for launching screen savers, but it
does not appear that I can query the system for how long it has been idle.  So
the other option that I can see at this point is to somehow monitor the system
message pump for user input.  However I do not know exactly where I can do
this.  Anyone have some ideas?

My development system is Microsoft Windows NT 4.0 Workstation (DEC Alpha).
The software is being developed to run on an NT 4.0 Server (DEC Alpha), using
Visual C++ 5.0.

Thanks!

Wayne Rigby



Fri, 21 Jul 2000 03:00:00 GMT  
 Monitoring System Idle Time

Quote:
> message pump for user input.  However I do not know exactly where I can do
> this.  Anyone have some ideas?

Check out CWinApp::OnIdle.  It might do what you need.
Hope this helps!

Jason Boehle



Fri, 21 Jul 2000 03:00:00 GMT  
 Monitoring System Idle Time

Quote:

>Check out CWinApp::OnIdle.  It might do what you need.
>Hope this helps!

I've already tried that.  It does not work well.  The application does not
appear to reset the idle count when there is superfluous mouse movement,
clicks, or key strokes.  So I don't get a true idle time for anything.

The best I have been able to do is to override the
CWinApp::PreTranslateMessage() method.  At this point, none of the mouse
moves, button clicks and keystrokes have been stripped off or handled at this
point.  Thus I can get a very good indication of how little the user is using
the current application.  However the message queue does not contain any user
input events which do not belong to the application.  I.e., any user input to
other applications or NT itself cannot be monitored this way, that I can tell
anyways.  So, does anyone have an idea on how to monitor system-wide messages?

Thanks for the input, keep it coming.

Wayne Rigby



Sun, 23 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to get system idle time or get notified after the system being idle for an extended time

2. How to get system idle time or get notified after the system being idle for an extended time

3. System Idle time

4. System Idle Time modification...

5. Getting idle time of system/os

6. system idle time

7. System Idle Time modification...

8. How to detect system idle time?

9. How to determine system idle time without hooks?

10. execute on system idle time

11. Get system idle time

12. How to obtain the login time and the idle time of the user

 

 
Powered by phpBB® Forum Software