View Single Post
Old 12-19-2018, 04:13 AM   #159
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,458
Default

Quote:
Originally Posted by cfillion View Post
Code:
-- likely Windows only (fails to find the curses control on macOS, didn't investigate)

local ide = reaper.JS_Window_Find("test.lua", false)
local curses = reaper.JS_Window_FindChildByID(ide, 0x452)

for c in ("Hello world"):gmatch('.') do
  reaper.JS_WindowMessage_Post(curses, "WM_CHAR", string.byte(c), 0, 1, 0)
end
(Looks like C++ would be able to send anything including shortcuts with modifiers. But bad things will happen if REAPER is built using a different curses.h than the extension.)

Yes, this method works as Edgemeal had already showed, but it has a limit of 64 characters.


Quote:
Originally Posted by juliansader View Post
Code:
reaper.JS_WindowMessage_Post(filterHWND, "0x0302", 0, 0, 0, 0)
I quickly checked, and it works fine in the Action list's filter editbox.

WM_SETTEXT has also not been implemented on macOS, so I haven't included it in the list of message names that the extension will recognize.

This does not work in the IDE window, where I am interested in.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote