SendMessage not working.
Issue #36
closed
Works in AHK:
Run("Notepad")
WinWait("Untitled - Notepad")
SendMessage(0x000C, 0, StrPtr("New Notepad Title")) ; 0X000C is WM_SETTEXT
Still experimenting, but difficult to see how this could work in Keysharp without StrPtr().
Comments (4)
-
repo owner -
reporter Tested with code below, works, thank you!
Run("Notepad") WinWait("Untitled - Notepad") SendMessage(0x000C, 0, "New Notepad Title") ; 0X000C is WM_SETTEXT
Please mark resolved and close.
-
repo owner - changed status to resolved
-
repo owner - changed status to closed
- Log in to comment
SendMessage() was indeed broken. I’ve fixed it so please test again.
Note that you don’t need StrPtr(). The magic of p/invoke takes care of it for you, so just pass the string directly.