From: Steve Teixeira Subject: Re: Sendkeys in Delphi? Date: 27 Jun 1995 23:55:28 GMT Essentially, what you want to do here is control other apps by sending wm_KeyUp/wm_KeyDown messages to a window, but there are two big problems with SendMessage and PostMessage: 1. You might not be able to easily find the intended receiver's window handle. 2. You could very well overflow the message queue with a long string. The way you get around this is to use a wh_JournalPlayback Windows hook so that windows can play the keypress messages "on-demand". It remedies the above problems because (1) the keys go to whatever window has focus (ie, "we don't need no steenking handles!"), and (2) Windows plays back the hook at its own pace, so your message queue is safe. BTW, I put a Delphi version of SendKeys in Delphi Developer's Guide. -Steve Teixeira steixeir@borland.com