newmenu = ""
local path = reaper.GetResourcePath()
local NameFile ="fx"
local  pathfull =path .. "\\ini\\" .. NameFile .. ".ini"
local menu1 = 0
local str_showmenu2 = ""
    local function no_undo();reaper.defer(function()end);end;

    ---------------------------------------------------------
    
    
local track = reaper.GetSelectedTrack(0,0)
if not  track then return end

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

end


    local title =NameFile
    gfx.init(title,5,5,0,5,5);
    
    
    if reaper.APIExists('JS_Window_Find')and
       reaper.APIExists('JS_Window_SetOpacity') then;
        local windowHWND = reaper.JS_Window_Find(title,true);
        if windowHWND then;
            reaper.JS_Window_SetOpacity(windowHWND,'ALPHA',0);
        end;
    end;
    
    
    local x, y = reaper.GetMousePosition();
    gfx.x = x - (tonumber(RetreatX) or 10);
    gfx.y = y - (tonumber(RetreatY) or 30);
    
    
    for i = 0, 10000 do
num1, num2 = reaper.BR_Win32_GetPrivateProfileString("actions", tostring(menu1), "nil", pathfull)
if  num2  ~= "nil" then
    local str_showmenu = num2.. menu1.."|"
str_showmenu2  = str_showmenu2 .. str_showmenu
menu1 = menu1 +1
else
break
end
end


    
    
    
        SHOWMENU5 = gfx.showmenu(str_showmenu2);
reaper.CF_SetClipboard( SHOWMENU5)

OO1 =         SHOWMENU5
--reaper.osara_outputMessage(        SHOWMENU5)
pp =2
                local  OOR = string.match(string.reverse(OO1),".+",pp+1)
                local  OORR = string.reverse(OOR)




num11,  fx_name = reaper.BR_Win32_GetPrivateProfileString("actions", OORR, "nil", pathfull)








if not fx_name:match';' then reaper.TrackFX_AddByName(track, fx_name, 0, -1)
else
  for name in fx_name:gmatch'(.-);' do reaper.TrackFX_AddByName(track, name, 0, -1) end
  if fx_name:sub(-1) ~= ';' then reaper.TrackFX_AddByName(track, fx_name:match'.*;(.*)', 0, -1) end
end
stats = reaper.Main_OnCommand(40291,0)
