Re: WM_KEYDOWN message



On Fri, 14 Apr 2006 21:19:23 +0200, "Tadek"
<ted66_USUN_TO_@xxxxxxxxxxxxx> wrote:

I have to replace a value (1,0030) with another (1,0050)
in a certain application. I have to do it 10000 times !
(I don't have the source code).
I started to do it manually by pressing the following keys:

Arrow down {move to next cell}
Shift-End {select content}
1,0050 {replace with a new value}
etc.

After 500 records I thought about writing my application,
which will be able to simulate pressing these keys.

I started:
h:=FindWindow(nil,TitleOfTheWindow); // it works
SendMessage(H,WM_CHAR,149,1) // it doesn't work

SendMessage sends a message to a window, but not to an active
control in this window.

How to send a message to an active control in an external application?

You might be better off using Keybd_event for sending the keys

Does WM_GETTEXT get the contents correctly ?
.



Relevant Pages

  • Re: troubles with KDE(?)
    ... Ctrl + Alt + K. After pressing these keys, I was able to kill the window. ...
    (linux.redhat)
  • WM_KEYDOWN message
    ... I started to do it manually by pressing the following keys: ... SendMessage sends a message to a window, ... How to send a message to an active control in an external application? ...
    (comp.lang.pascal.delphi.misc)
  • Re: X application keyboard snooper
    ... > would like to show what keys I'm currently pressing in a small window on the ... % apt-cache search record X11 ...
    (Debian-User)
  • Re: locked startup window
    ... When I select "Safe Mode", ... Despite pressing these three keys ... ... the password window. ...
    (microsoft.public.windowsxp.general)
  • Re: CLS9 on the CoCo
    ... > And pressing the following two keys (and holding them down while pressing ... > the black reset button on the back of the CoCo 3): ... where computers were sold back in those days. ...
    (comp.sys.cbm)