Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!orca!javelin.es.com!lwallace From: lwallace@javelin.es.com (Raptor) Newsgroups: comp.windows.ms.programmer Subject: Duplicating keyboard messages...? Message-ID: <1991Mar19.164227.19245@javelin.es.com> Date: 19 Mar 91 16:42:27 GMT Organization: Evans & Sutherland Computer Corp., Salt Lake City, Utah Lines: 26 Hi all, I'm trying to write sort of a macro recorder. It'll send imaginary keystrokes to other applications in an effort to invoke some of their menu accelerator functions. I've sent WM_KEYUPs and WM_KEYDOWNs to other applications, and used Spy to examine them. The messages I send are almost identical to the messages Spy shows when I click on the app and press the keys myself. However, the only application I've been able to get to respond to my program is SDKHelp. I've only tried the apps in the SDK tools group; Dialog and SDKPaint ignore me. The only difference I can detect between my app's messages and the messages from the keyboard are those "used internally by Windows" bits in the WM_KEY* message lParams. And so far I've only sent WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN and WM_SYSKEYUP messages. Spy tells me WM_MENUCOMMAND shows up when I press keys; please tell me this is something done in response to the WM_KEY* messages. What else does my program have to do? Am I seeing an idiosyncracy in Microsoft tools, and can I expect "normal" Windows applications to react as I expect? Thanks in advance! -- Lynn Wallace |I am not an official representative of Evans and Sutherland Computer Corp.| <- E&S. Or for that matter, unofficial. Salt Lake City, UT 84108 |Internet: lwallace@javelin.sim.es.com War not make one great! -- Yoda