I have a Basic function that calculates idle time:
Private Type LASTINPUTINFO
cbSize As Long
dwTime As Long
End Type
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Declare Function GetLastInputInfo Lib "user32" (plii As Any) As Long
Sub Main
Dim lii As LASTINPUTINFO
lii.cbSize = Len(lii)
Call GetLastInputInfo(lii)
RoboTaskApp.SetUserVariable "IDLE_SECONDS", Str((GetTickCount() - lii.dwTime) \ 1000)
End Sub
However, this would be more handy as a system variable. I use it to tell when the user is using the computer again after a long idle. So this would also make a nice trigger, like "On Wake Up" or some such name. It would be nice not to have the computational overhead of the Basic Plug In every time you want to calculate this value.
Thanks!
System Variable Idle Seconds
System Variable Idle Seconds
Good idea, but function GetLastInputInfo is supported by Windows 2000 or higher.
System Variable Idle Seconds
Does that mean, if you were to add the feature, I won't be able to use RoboTask with Windows 98? Oh no!
Last edited by ahunkins on Fri Mar 10, 2006 11:18 am, edited 1 time in total.
System Variable Idle Seconds
Probably we will implement this feature in next release, but without of using of GetLastInputInfo function.