Angelscry Posted August 5, 2006 Share Posted August 5, 2006 (edited) Hi !!!! Someone know if there's a simply way to clear the keyboard buffer with AutoIt ?? Thank U Edited August 5, 2006 by Angelscry Link to comment Share on other sites More sharing options...
Paulie Posted August 5, 2006 Share Posted August 5, 2006 Hi !!!!Someone know if there's a simply way to clear the keyboard buffer with AutoIt ?? Thank Uwell, how would you do it manually?just do that in autoit Link to comment Share on other sites More sharing options...
Fossil Rock Posted October 19, 2006 Share Posted October 19, 2006 I'd like to know how to do this as well .... well, how would you do it manually?just do that in autoitI don't think there is a manual way to do it. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
PaulIA Posted October 19, 2006 Share Posted October 19, 2006 I looked into this many years ago. The basic keyboard flow is:Keyboard --> Keyboard Device Driver --> System Message Queue --> Thread Message Queue --> Thread Message Loop --> Window ProcedureIf you want to manipulate the keyboard buffer itself, you'd have to work at the keyboard device driver level or lower. Uggh... I "empty" the keyboard in our application software. I launch Word to let users edit a document and I want them to close Word before letting them work in our application again. While I'm waiting for them to close Word, I sit in a loop looking at the message queue. I discard any keyboard or mouse messages sent to my application. That way, they can't click or type in our application until they close Word first.HTH Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Uten Posted October 19, 2006 Share Posted October 19, 2006 hmm, what is the purpose of this? @PaulIA: Would notGuiSetState(@SW_HIDE) RunWait("msword.exe") ;Or somthing similar GuiSetState(@SW_SHOW)Do this? If I recall right you can do a api call to clear the keybord buffer. Check out the api calls used by _IsPressed in Misc.au3. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
PaulIA Posted October 19, 2006 Share Posted October 19, 2006 GuiSetState(@SW_HIDE) RunWait("msword.exe") ;Or somthing similar GuiSetState(@SW_SHOW) I can't hide the screen. The users need to refer back to information on the screen when typing information in Word. I checked out _IsPressed in Misc.au3, but I'm missing what you are referring to. The only API call that _IsPressed makes is to GetAsyncKeyState to determine if a key is pressed. Am I missing something? Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Uten Posted October 20, 2006 Share Posted October 20, 2006 If you poke around MSDN I think you will find how to clear the buffer using that, or an assosiated, API call. I might recall wrong thought, it's just to many API calls for my brain to handel Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
PaulIA Posted October 20, 2006 Share Posted October 20, 2006 I really don't think there is any API call to directly access the keyboard hardware. The keyboard device driver does this for you. I think the only way to empty the keyboard is to install a hook using SetWindowsHookEx (if you need to empty keys at a global level) or PeekMessage/Dispatch if you only need to do this within your application.If anybody does know of an API call to do this, I would be interested in hearing about it too. Auto3Lib: A library of over 1200 functions for AutoIt 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