Jump to content
Sign in to follow this  
adik2dmax666

get milliseconds between keypress?

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...