[python-win32] SendMessage & WM_SYSKEYDOWN (Newbie)

Mark Hammond mhammond@skippinet.com.au
Tue, 5 Mar 2002 16:42:02 +1100


This problem is more a generic Win32 problem than a Python one.  Eg, it may
be as simple as sending a WM_SYSKEYUP after the key down message.

Try and find the answer for *any* language.  Then, once we know we have a
technique that works, we can implement it in Python.

Mark.

> -----Original Message-----
> From: python-win32-admin@python.org
> [mailto:python-win32-admin@python.org]On Behalf Of Andy W
> Sent: Tuesday, 5 March 2002 4:18 PM
> To: python-win32
> Subject: [python-win32] SendMessage & WM_SYSKEYDOWN (Newbie)
>
>
> Hi,
>
> I am quite new to using the win32 programming, and would love
> some answers.
>
> I am making a program that sends key and mouse messages to a
> window external
> to it. I have managed to send WM_KEYDOWN, WM_CHAR and WM_KEYUP messages
> successfully, as well as other non keyboard-related messages.
> The program whose window that I wish to send messages to has customisable
> hot-keys. ALT-P is one of them. I have looked through the win32gui
> documents, and also have searched on the web. I found some websites saying
> that I should send a WM_SYSKEYDOWN message. It was a little vague, and in
> VB, so as a newbie I wasn't terribly confident in getting the
> right result.
>
> I did the following:
> win32gui.SendMessage(hWnd, WM_SYSKEYDOWN, ord("P"), 0)
>
> This did nothing. Another website I looked at told me to set the
> 29th bit of
> lparam. I did this, but still nothing...
>
> Can someone please show how I should send such a message. I also
> would like
> to do add control & shift modifiers, and have combinations.
> If this request generates an "RTFM" reply, could someone please
> point me to
> the "FM".
>
> Thanks,
> Andy W
>
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
>