[SOLVED] Is there a way to populate a list of "open external editors"?

Hi, I have a script that hides “all” trackdsp external editors for the track i’m on.
but sometimes i’m not on the track i opened the external editors at.
so how would i go about modifying this to close only the external editors that are open?

renoise.tool():add_keybinding{name="Global:Paketti:Hide Track DSP Devices",invoke=function()
  if table.count(renoise.song().selected_track.devices) >1 then
     for i=2,(table.count(renoise.song().selected_track.devices)) do 
      if renoise.song().selected_track.devices[i].external_editor_available==true
       then
       renoise.song().selected_track.devices[i].external_editor_visible=false
      end
     end
  end
end}

well like this:

function hide_all_external_editors()
  local song=renoise.song()
  local num_tracks=#song.tracks

  for track_index=1,num_tracks do
    local track=song:track(track_index)
    local num_devices=#track.devices

    for device_index=2,num_devices do
      local device=track:device(device_index)

      if device.external_editor_available and device.external_editor_visible then
        device.external_editor_visible=false
      end
    end
  end
end

renoise.tool():add_keybinding{name="Global:Paketti:Hide Track DSP Devices for All Tracks",invoke=function() hide_all_external_editors() end}

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.