[python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-04-07 Thread Thomas Heller
ctypes is a wonderful package -- invaluable for someone doing Win32 API work. Basically, it allows you to call any API in any DLL, as long as you can describe the parameters. except mapvirtualkey. not that it matters now, anyway, but, behold this: # ##code: from ctypes import * import

Re: [python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-04-07 Thread Daniel F
Unicode Implemented as ANSI and Unicode versions. Which means: Call MapVirtualKeyA for ansi strings, MapVirutalKeyW for unicode strings. aha! that works. :) never would have guessed just by looking at that unicode line what it actually means... Daniel, off to learn how to inject

Re: [python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-04-02 Thread Daniel F
Wait, spoke a bit too soon. I noticed that you (Tim) apparently missed a zero in your first method of building the bits (8 with 6 zeros instead of 7), which generates only a 28bit number, not 32bits. (which i blindly copy pasted at first...). when i try to make an actual 32bit value, and then send

[python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-04-01 Thread Roel Schroeven
Tim Roberts wrote: On Wed, 30 Mar 2005 20:46:43 -0500, Daniel F [EMAIL PROTECTED] wrote: Well... i figured it out - turns out sending the keystrokes to the top window of notepad didnt work, but sending them to the Edit child window of notepad did the trick. But this brings me to another

Re: [python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-04-01 Thread Tim Roberts
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

Re: [python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-04-01 Thread Daniel F
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

Re: [python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-03-31 Thread Tim Roberts
On Wed, 30 Mar 2005 20:46:43 -0500, Daniel F [EMAIL PROTECTED] wrote: Well... i figured it out - turns out sending the keystrokes to the top window of notepad didnt work, but sending them to the Edit child window of notepad did the trick. But this brings me to another question, although of a less

[python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-03-30 Thread Daniel F
Well... i figured it out - turns out sending the keystrokes to the top window of notepad didnt work, but sending them to the Edit child window of notepad did the trick. But this brings me to another question, although of a less urgent manner. i had to send WM_CHAR messages, rather than

[python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-03-30 Thread Roel Schroeven
Daniel F wrote: Well... i figured it out - turns out sending the keystrokes to the top window of notepad didnt work, but sending them to the Edit child window of notepad did the trick. But this brings me to another question, although of a less urgent manner. i had to send WM_CHAR messages,