View Single Post
Old 01-23-2020, 12:31 PM   #912
Human being with feelings
Edgemeal's Avatar
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,918

Originally Posted by amagalma View Post
How could I get the list of items in a combox?
Not sure if the API has been updated since I tried that (post 249), but I ended up doing it like,..

itemCount = reaper.JS_WindowMessage_Send(combo, "CB_GETCOUNT", 0,0,0,0 )
cur_index = reaper.JS_WindowMessage_Send(combo, "CB_GETCURSEL", 0,0,0,0) -- save current index
for i = 0, itemCount-1 do 
  reaper.JS_WindowMessage_Send(combo, "CB_SETCURSEL", i, 0,0,0)
  t[#t+1] = reaper.JS_Window_GetTitle(combo,"") -- save item text to table
reaper.JS_WindowMessage_Send(combo, "CB_SETCURSEL", cur_index, 0,0,0) -- restore index
Odd thing is, I can't get the handle to that ComboBox or any of the children on that window, I got combobox handle from SPY++ to test that code.

Last edited by Edgemeal; 01-23-2020 at 12:37 PM.
Edgemeal is offline   Reply With Quote