--- In [email protected], "majesticartz" <majestica...@...> wrote:
>
> postmessage(han, msg, wp, lp)
> 
> Let's say I want to send a WM_command 770 to notepad
>

WM_command is a constant, if you google "define wm_command" you will
find it is 0x111. Decimal conversion of 0x111 is 273. You can use the
hex or decimal value in postmessage and sendmessage. Or you could
define a variable wm_command equal to the hex or decimal value and use
the variable wm_command as the argument. Similarly, the constant value
for wm_paste is 770.

Notepad must already be running. Notepad needs to have focus to
process the message. I think if you use postmessage when notepad
doesn't have focus, the message will never be processed. If you use
sendmessage, it will be processed when notepad gets focus.

win.setfocus(win.handle("=notepad"))
win.postmessage(win.handle("=notepad"), 273, 770, 0)

Regards,
Sheri

Reply via email to