Thank you all for your suggestions! Using PostMessage with WM_KEYDOWN/KEYUP, and creating the lparam bitfield like that, does the trick quite well. Really appreciate your help! :)
On Apr 1, 2005 12:59 PM, Tim Roberts <[EMAIL PROTECTED]> wrote: > On Thu, 31 Mar 2005 21:40:02 -0500, Daniel F <[EMAIL PROTECTED]> wrote: > > >Well, i do need a general solution, I was just using notepad as a test > >case... So it's definitely good for me to know about this - thanks! > >But i wonder, isnt there some kind of an "upstream" event, that could > >be generated and then would automatically generate and propagate all > >of the keydown, char, and keyup events, so i do not have to worry > >about sending all three? > > > > > > You might investigate MapVirtualKey, keybd_event, and SendInput. I have > no clue whether these are exposed in the Python Win32 extensions. > Overall, I would guess the three-message parlay is the lowest-impact method. > > >also, as to roel's earlier post... could I please have some help on > >how to generate a bit field in python, in order to send a well-formed > >lParam to SendMessage, and thus create a well-formed WM_KEYUP/KEYDOWN > >event? > > > > Python supports C expressions; you just build it by hand: > > bits = 0x8000000 | 0x00030000 | vkKey > > Or, if you prefer the bit numbers explicitly: > > bits = (2 << 30) | (3 << 16) | vkKey > > -- > - Tim Roberts, [EMAIL PROTECTED] > Providenza & Boekelheide, Inc. > > _______________________________________________ > Python-win32 mailing list > Python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 > _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32