Jump to content

Recommended Posts

Posted

I want to write a systemwide keyhook to check if 'F1' is pressed.

In VB you call

Private Declare Function GetAsyncKeyState Lib "user32" (ByVal uAction As Long) As Long
and check
GetAsyncKeyState(112) <> 0

I cannot translate the code to AutoIt and suppress the original function (help).

In VB it looks like

Private Declare Function GetAsyncKeyState Lib "user32" (ByVal uAction As Long) As Long
Private Sub Form_Load()
While 1
If GetAsyncKeyState(112) <> 0 Then MsgBox "F1 pressed"
Wend
End Sub

Maybe someone give me a hint...or the right code :(

Posted

To explain:

The keyhook works, but if you ran an application, the functionkey already has both functions (HELP and AutoIt's).

The origin function is executed first, can we catch up this or make them ignore?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...