09-04-2006, 06:19 AM
How can I calculate the Idle time of system?
Idle time
|
09-04-2006, 06:19 AM
How can I calculate the Idle time of system?
09-04-2006, 06:26 AM
Use GetLastInputInfo.
Example. Function ResumeWhenIdle: ;/
09-04-2006, 06:31 AM
Thanks.
09-04-2006, 09:06 AM
Is it possible in Windows 98?
09-04-2006, 09:55 AM
Needs to use keyboard and mouse hooks. They must be in a dll. I found one:
http://www.codeproject.com/dll/trackuseridle.asp Download source files (you may need to register before you can download) and move IdleTrac.dll to QM folder. Example:
09-04-2006, 10:04 AM
Thanks again.
10-13-2014, 05:07 AM
10-13-2014, 10:08 AM
Yes, should be 20 if you don't use the mouse, keyboard.
It is very simple function, just calls Windows API function GetLastInputInfo.
10-13-2014, 02:48 PM
Yes, but I don't. I get i=0. I am not touching the mouse or keyboard.
The reason I ask is because now the function below does not work for me either. I upgraded from XP to Win7 yesterday. This function below definitely used to work in XP. But it does not work in Win7 on my machine. I take it both of these work for you in Win7? Or if any other forum members can test in Win7 that would be appreciated. Maybe it's just my machine. Function IdleTimeMinutes
10-13-2014, 04:09 PM
GetIdleTime works here on Windows 7.
IdleTimeMinutes also should work. GetLastInputInfo: http://msdn.microsoft.com/en-us/library ... 85%29.aspx
10-13-2014, 07:56 PM
Yikes, sorry, I thought I had installed all Win7 updates. Some were missing. That was the problem.
|
« Next Oldest | Next Newest »
|