View Single Post
Old 10-18-2018, 08:38 AM   #62
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,365
Default

Quote:
Originally Posted by juliansader View Post
v0.95 uploaded:
* New function: JS_Window_SetOpacity.
* New function: JS_Window_GetClassName.
* Extension loads properly in Linux.
Thanks for adding JS_Window_GetClassName, but I can't figure how to use it , everything I try says, 'attempt to call a nil value'


Code:
function print(str)
  reaper.ShowConsoleMsg(tostring(str) .. "\n")
end

-- get handles to windows with title "FX:" -- (e.g., FX: Track 1)
hWnd_array = reaper.new_array({}, 100)
reaper.JS_Window_ArrayFind("FX: ", false, hWnd_array) 
tHandles = hWnd_array.table()
-- display title and classname,
for i = 1, #tHandles do
  tHandles[i] = reaper.JS_Window_HandleFromAddress(tHandles[i])
  -- get window text - OK!
  t = reaper.JS_Window_GetTitle(tHandles[i], "")
  print(t)
   -- get classname text - ??
   classname = JS_Window_GetClassName(tHandles[i], "") -- < ERROR!
   print(classname)
end
Edgemeal is offline   Reply With Quote