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
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
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
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
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
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
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
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
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,