Difference between revisions of "Lua:sendMessage"
Jump to navigation
Jump to search
(Created page with "<p> <b>sendMessage(hwnd, msg, wparam, lparam)</b>: result - Sends a message to a window. Those that wish to use it, should know how to use it (and fill in the msg id's yoursel...") |
(No difference)
|
Latest revision as of 01:01, 28 August 2020
sendMessage(hwnd, msg, wparam, lparam): result - Sends a message to a window. Those that wish to use it, should know how to use it (and fill in the msg id's yourself)
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage
local WM_IME_CHAR = 0x0286 local hWnd = 0x000406E0 local text = "hello" for i=1,#text do local c = string.sub(text, i, i) local wParam = textToShortCut(c) local lParam = textToShortCut(c) sendMessage( hWnd, WM_IME_CHAR, wParam, lParam ) end