adik2dmax666 0 Posted May 5, 2010 not working #include <timer.au3> Global $file = FileOpen(@ScriptDir&"\aw.txt",1), $user32 = DllOpen("user32") While 1 If _IsPressed('25') = 1 Then ;left arrow key While _IsPressed("25") = 1 Sleep(1) WEnd Global $iIdleTime = _Timer_GetIdleTime() _amfness("LEFT") EndIf sleep(1) WEnd Func _amfness($keyPress) FileWrite($file,$keyPress & '=' & $iIdleTime) EndFunc Func _IsPressed($hexKey) Local $aR, $bRv $hexKey = '0x' & $hexKey $aR = DllCall($user32, "int", "GetAsyncKeyState", "int", $hexKey) If $aR[0] <> 0 Then $bRv = 1 Else $bRv = 0 EndIf Return $bRv EndFunc First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack. -George Carrette[sub]GD Keylogger Creator (never released)[/sub][sub]Garena Autojoin v3.0[/sub] Share this post Link to post Share on other sites
exodius 1 Posted May 5, 2010 (edited) $user32 = DllOpen("user32.dll") The devil is in the details. Edited May 5, 2010 by exodius Share this post Link to post Share on other sites