function SplitFilename(strFilename)
  return string.match(strFilename, "(.-)([^.]+)$")
end


function nothing()
end

sel_t_cnt = reaper.CountSelectedTracks(0)

if sel_t_cnt >= 0 then
  t = reaper.GetSelectedTrack(0, 0)
  t_send_cnt = reaper.GetTrackNumSends(t, -1)
N =     t_send_cnt
  if t_send_cnt >= 0 then

    script_title = "show selected track receives fx window"
    reaper.Undo_BeginBlock()
Z = ""    
    for x = 0, t_send_cnt-1 do
      t_send = reaper.BR_GetMediaTrackSendInfo_Track(t, -1, x, 0) -- get x recieve of sel track
local Omena = ""
local Numberer = reaper.GetMediaTrackInfo_Value(t_send,"IP_TRACKNUMBER")
 Numberer1,  Numberer2=  SplitFilename(Numberer)
pp = 1
                local  Numberer1 = string.match(string.reverse( Numberer1),".+",pp+1)
                local  Numberer1 = string.reverse( Numberer1)

Z = Z .. Numberer1 .. " "

    end



if N == 1 then
NN = " Recieve "
else
NN = " Recieves "
end

if Z == "" then
Y = " No Receive "
else
Y = " has " ..N .. NN .. " from " ..Z
end


     reaper.osara_outputMessage(Y)
    reaper.Undo_EndBlock(script_title, -1)
    
  else
    reaper.defer(nothing)
  end
else
  reaper.defer(nothing)
end
