lod3n Posted August 15, 2006 Posted August 15, 2006 I am new to the forum, so I thought I'd contribute something. Enjoy. func _IdleTicks() Local $aTSB, $ticksSinceBoot, $struct, $ticksSinceIdle $aTSB = DllCall ("kernel32.dll", "long", "GetTickCount") $ticksSinceBoot = $aTSB[0] $struct = DllStructCreate("uint;dword"); DllStructSetData($struct, 1, DllStructGetSize($struct)); DllCall("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr($struct)) $ticksSinceIdle = DllStructGetData($struct, 2) return $ticksSinceBoot - $ticksSinceIdle endfunc [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
GaryFrost Posted August 15, 2006 Posted August 15, 2006 Welcomehttp://www.autoitscript.com/forum/index.ph...st&p=163546 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
lod3n Posted August 15, 2006 Author Posted August 15, 2006 Yes, that looks familiar. Thank you. I forgot where I got that. You provided the GetLastInputInfo part, and ezzetabi provided the GetTickCount part:http://www.autoitscript.com/forum/index.ph...hl=GetTickCountMy apologies for not originally providing due credit and links to the original sources. I will make sure I do so in the future. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now