1. [WIN] stuffing keyboard buffer
- Posted by joshua goldberg <futures8 at bellsouth.net> Jul 04, 2001
- 375 views
Hi, all. Several people responded to my request on how to stuff the keyboard buffer, so that a program would 'think' a certain key had been pressed. Tone.Skoda suggested the following: sendMessage(WM_KEY,WM_KEYDOWN,key,lParam) sendMessage(WM_KEY,WM_KEYUP,key,lParam) That presents two new problems (both the result of my own ignorance about how Win32lib works). What needs to go in 'key', and what should go into 'lParam'? I have reviewed the doco for Win32lib, but these two parameters are not discussed (that I can find). I did find the definition of sendMessage, which is as follows: global function sendMessage( integer id, atom cmd, atom wParm, atom lParm ) but that still didn't tell me what should go into these two parameters. I found the following in the definition for IsHotKey() if event = WM_SYSKEYDOWN and key = VK_F10 then VOID = sendMessage(id, WM_KEYDOWN, key, lParam) In this case, the contents of key are: VK_F10 leading me to think that perhaps the parameter 'key' can contain VK_I to send the upper case letter 'I', or VK_F to send the uppercase letter 'F', (the keystrokes I'm trying to emulate), but I'm really just guessing. If anyone has had experience with the 'sendMessage' command and can help me with the correct contents of these two parameters, I would appreciate your help. Thanks. Josh
2. Re: [WIN] stuffing keyboard buffer
- Posted by euman at bellsouth.net Jul 04, 2001
- 367 views
BTW, id is the name of your window just incase you wanted to know this. generally by looking at WinMain( id, Normal) is the best way to tell. id is normally called hWnd or Window1 or just about any unique name youve given when you created the Window. Euman euman at bellsouth.net
3. Re: [WIN] stuffing keyboard buffer
- Posted by euman at bellsouth.net Jul 04, 2001
- 371 views
that shouldve been a private message..... sorry' Euman euman at bellsouth.net ----- Original Message ----- From: <euman at bellsouth.net> To: "EUforum" <EUforum at topica.com> Subject: Re: [WIN] stuffing keyboard buffer > > > BTW, id is the name of your window just incase > you wanted to know this. > > generally by looking at WinMain( id, Normal) > is the best way to tell. > > id is normally called hWnd or Window1 or > just about any unique name youve given when > you created the Window. > > Euman > euman at bellsouth.net > > > > > >
4. Re: [WIN] stuffing keyboard buffer
- Posted by Tone Skoda <tone.skoda at siol.net> Jul 04, 2001
- 376 views
> That presents two new problems (both the result of my own ignorance about how Win32lib works). What needs to go in > 'key', and what should go into 'lParam'? Key would possibly be VK_... You need to get Win32API help. There are many places you can download it, or use the online version at: http://msdn.microsoft.com/library Much more up to date, like Thomas said. (here's part: ) Keyboard Input Messages The following messages are used to receive and process keyboard input. WM_ACTIVATE WM_CHAR WM_DEADCHAR WM_GETHOTKEY WM_HOTKEY WM_KEYDOWN WM_KEYUP WM_KILLFOCUS WM_SETFOCUS WM_SETHOTKEY WM_SYSCHAR WM_SYSDEADCHAR WM_SYSKEYDOWN WM_SYSKEYUP
5. [WIN] stuffing keyboard buffer
- Posted by joshua goldberg <futures8 at bellsouth.net> Jul 03, 2001
- 390 views
Hi, all. I had previously asked whether it's possible to 'stuff' the keyboard buffer with a key-code, so that a program 'thinks' that an actual key had been pressed (in the manner of Foxpro's 'keyboard' command). (I have reviewed the documentation (both Euphoria doco and Win32Lib doco, and have searched the archives and recent user contributions and studied those programs whose description or title contained the keyword 'keyboard', but all to no avail). No one responded to my previous question (I submitted it in the wee hours of a weekend morning; maybe no one noticed it), so I'm submitting it once again. Any help will be very much appreciated. Thanks. Josh