unterhunde Posted September 14, 2006 Posted September 14, 2006 Is it possible to capture keypresses prior to letting windows recieve them? (Like writing a LL API to hook keyboard in VB). I wouldnt mind just being able to catch keypresses sent toward my GUI and then be able to relay them to any windows handle/controlID. Are either of these possible?
sohfeyr Posted September 14, 2006 Posted September 14, 2006 Is it possible to capture keypresses prior to letting windows recieve them? (Like writing a LL API to hook keyboard in VB).I wouldnt mind just being able to catch keypresses sent toward my GUI and then be able to relay them to any windows handle/controlID.Are either of these possible?Look at _IsPressed or HotKeySet. Anything going beyond those sounds too much like a keylogger, and you'll have a very hard time getting help for that - and rightly so, too. You should expect an earful anyways.Have you considered a different approach to your ultimate goal? For the purposes you describe, you might rather consider ControlFocus or WinActivate. Perhaps you could use the hotkeys to set the target window or control, that kind of thing. A sufficiently customizable app could take that notion a long way.If you're intent on using a keyboard hook, AutoIt is definitely not the tool of choice. Mine:Time Functions - Manipulate the system clock! | WinControlList (WinGetClassList++) | .Net Setup Wrapper, Detect or install .Net | Writing and using a VB .NET COM object in AutoItNot mine, but highly recommended:AutoItTreeViewExtension plugin | Menu code | Callback helper dll | Auto3Lib - Control the uncontrollable | Creating COM objects in AutoIt | Using .Net framework classes in AutoIt
unterhunde Posted September 15, 2006 Author Posted September 15, 2006 Look at _IsPressed or HotKeySet. Anything going beyond those sounds too much like a keylogger, and you'll have a very hard time getting help for that - and rightly so, too. You should expect an earful anyways.Have you considered a different approach to your ultimate goal? For the purposes you describe, you might rather consider ControlFocus or WinActivate. Perhaps you could use the hotkeys to set the target window or control, that kind of thing. A sufficiently customizable app could take that notion a long way.If you're intent on using a keyboard hook, AutoIt is definitely not the tool of choice.Its ok thank you. I am making a program to run multiple gaming windows. I want the console to be able to catch keys and then duplicate and transmit them to all windows under its command.I am also doing this project in VB. The AutoIT is just to see hwo far I can push the AutoIT script language. (and to have an easy to edit script for my less computer literate friends)Thanks for your suggestions.
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