TIP: Click on subject to list as thread! ANSI
echo: delphi
to: BART BROERSMA
from: MARTIN MAAT
date: 1997-05-09 10:52:00
subject: Sending Keys

Hallo Bart
 BB> Problem 1: I need to determine if a given DOS program is running
 BB> (only know  the .exe name, lets say wp.exe (while in fact it is not
 BB> wp...)) and get a handle to it.
FindWindow API function.
 BB> Problem 2: I need to send keys to the above mentioned DOS program
 BB> to  simulate keystrokes.
SendMessage(WM_KEY...  something like that. I never got it working with 
notepad being the target. Finding windows was easy, sending keystrokes never 
worked. I tried SendMessage and PostMessage with several messages (WM_CHAR, 
WM_KEYDOWN, etc.). However, this should be the way to go. If you get it 
working, please post the code.
Groeten, Martin.
--- FMail/386 1.02
---------------
* Origin: -=[ E-mail: m_maat@knoware.nl .......... ]=- (2:286/420.1)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.