Man-wai Chang <[email protected]> wrote: >I would like to use SendMessage() to send keystrokes to another window > >#define WM_KEYDOWN 0x0100 >#define WM_KEYUP 0x0101 > >DECLARE INTEGER SendMessage IN user32; > INTEGER hWnd,; > INTEGER Msg,; > INTEGER wParam,; > INTEGER lParam > >DECLARE SHORT VkKeyScan IN user32; > INTEGER ch > >m.xx=VkKeyScan(asc("A")) >SendMessage( ln_current_window, WM_KEYDOWN, m.xx, 0) >SendMessage( ln_current_window, WM_KEYUP, m.xx, 0) > >It didn't work. Tried it on Notepad as well as Command Prompt. > >What's wrong with my codes?
I know some security related changes came with Vista that may prevent that. Does this code work on XP, but not Vista/7? -- Tracy Pearson PowerChurch Software Sent with K-9 Mail. _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

