View Single Post
Old 12-11-2019, 01:37 PM   #825
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,702
Default

Quote:
Originally Posted by X-Raym View Post
Is there a way to know on a text field at which character position the TEXT CARRET "ⵊ" cursor is ?


Thx!
Maybe Try EM_GETSEL, something like this, using search box in explorer as test....

Code:
EM_GETSEL = "0x00B0"
local explorer = reaper.OpenMediaExplorer("", false)
if explorer then
  local search = reaper.JS_Window_FindChildByID(explorer, 1015) 
  local retval = reaper.JS_WindowMessage_Send(search, EM_GETSEL, 0,0,0,0)
  local caret_pos = retval & 0xFFFF 
  msg(caret_pos)
end
Edgemeal is offline   Reply With Quote