Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Idle time
#9
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
Code:
Copy      Help
function#

type LASTINPUTINFO cbSize dwTime
dll- user32 #GetLastInputInfo LASTINPUTINFO*plii
LASTINPUTINFO lii.cbSize=sizeof(LASTINPUTINFO)
GetLastInputInfo &lii

int systemstarttime=GetTickCount/(60*1000)
int lastinput=lii.dwTime/(60*1000)

ret systemstarttime-lastinput


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)