Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Global $iOldHex
- While Sleep(50)
- _CheckKey()
- WEnd
- Func _CheckKey()
- For $i = 1 To 32768
- $iValue = StringTrimLeft(Hex($i), 6)
- $iHex = "0x" & $iValue
- $aResult = DllCall("user32.dll", "short", "GetAsyncKeyState", "int", $iHex)
- If @error Then Return SetError(@error, @extended, 0)
- If BitAND($aResult[0], -32768) <> 0 AND $iHex <> $iOldHex Then
- MsgBox(0,"Key", $iHex)
- $iOldHex = $iHex
- EndIf
- Next
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement