1. [WIN] stuffing keyboard buffer

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

new topic     » topic index » view message » categorize

2. 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

new topic     » goto parent     » topic index » view message » categorize

3. Re: [WIN] stuffing keyboard buffer

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
> 
> 
> 
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: [WIN] stuffing keyboard buffer

> 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

new topic     » goto parent     » topic index » view message » categorize

5. [WIN] stuffing keyboard buffer

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu