View Single Post
Old 02-13-2019, 03:10 PM   #237
Human being with feelings
Sexan's Avatar
Join Date: Jun 2009
Location: Croatia
Posts: 2,082

how does "reaper.JS_Window_ListAllChild" now work? sorry have not been here for a while, I'm not up to date with stuff. I've use it to find Track list (TCP) but now it expects a number?

This is how I've used to get it:
function get_track_zoom_offset(tr,y_end,h,scroll)
    reaper.JS_Window_ListAllChild(main_wnd, "test", "list") -- here
    local found = reaper.GetExtState("test", "list")
    if not found then return end
    local fl,offset
    for adr in found:gmatch("%w+") do -- here
      local handl = reaper.JS_Window_HandleFromAddress(tonumber(adr)) --here
      if reaper.JS_Window_GetLongPtr(handl, "USER") == tr then --here
        if mixer_wnd ~= reaper.JS_Window_GetParent(reaper.JS_Window_GetParent(handl)) then fl = handl break end
    if not fl then return end
    local __, __, ztop, __, __ = reaper.JS_Window_GetRect(fl)
    if y_end > (ztop + h - 1) then offset = y_end - ztop - h end
    return offset

Last edited by Sexan; 02-13-2019 at 03:15 PM.
Sexan is offline   Reply With Quote