How to send a string between scripts using sendmessage?
Posted: 19 Oct 2021, 20:04
At the sendmessage docs it says:
and in the second script:
but the output of the msgbox is only numbers, am i doing something wrong?
I tried on the first script:A string may be sent via wParam or lParam by specifying the address of a variable. The following example uses the address operator (&) to do this:
SendMessage, 0xC, 0, &MyVar, ClassNN, WinTitle ; 0XC is WM_SETTEXT
Code: Select all
MyVar := "Hello"
SendMessage, 0x99, &MyVar, &MyVar,, test
Return
Code: Select all
OnMessage(0x99, "Msg")
Gui, Show, w200 h200, test
return
Msg(wParam, lParam) {
MsgBox wParam %wParam% lParam: %lParam%
}