Westi Posted June 9, 2005 Share Posted June 9, 2005 I want to write a systemwide keyhook to check if 'F1' is pressed. In VB you callPrivate Declare Function GetAsyncKeyState Lib "user32" (ByVal uAction As Long) As Longand checkGetAsyncKeyState(112) <> 0 I cannot translate the code to AutoIt and suppress the original function (help). In VB it looks likePrivate 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 Link to comment Share on other sites More sharing options...
GaryFrost Posted June 9, 2005 Share Posted June 9, 2005 might want to check this thread http://www.autoitscript.com/forum/index.ph...opic=5760&st=0# SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Westi Posted June 9, 2005 Author Share Posted June 9, 2005 Very thank you, but the original function of 'F1' is already enabled. Can we disable this behaviour? Link to comment Share on other sites More sharing options...
Westi Posted June 9, 2005 Author Share Posted June 9, 2005 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? Link to comment Share on other sites More sharing options...
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