
local reaper = reaper

-- Display a message in the console for debugging
function Msg(value)
  if console then
    reaper.ShowConsoleMsg(tostring(value) .. "\n")
  end
end

--------------------------------------------------------- END OF UTILITIES

-- Main function
function Main()

  -- See if there is items selected
  count_sel_items = reaper.CountSelectedMediaItems(0)

  reaper.ClearConsole()
local mena = ""
  for i = 0, count_sel_items - 1 do

    local item = reaper.GetSelectedMediaItem( 0, i )
    local take = reaper.GetActiveTake( item )
    if take then
      local name = reaper.GetTakeName( take )
 mena = mena .. name
    end

  end
    reaper.osara_outputMessage(mena)
end

-- INIT
reaper.defer(Main)
