local mooner =" "
newmenu = ""
local path = reaper.GetResourcePath()
local NameFile ="notation"
local  pathfull =path .. "\\ini\\" .. NameFile .. ".ini"
local menu1 = 1
local str_showmenu2 = ""


    ---------------------------------------------------------
    
    

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("actionsName", tostring(menu1), "nil", pathfull)
num19, num29 = reaper.BR_Win32_GetPrivateProfileString("actionsNumber", tostring(menu1), "nil", pathfull)
statt =  reaper.NamedCommandLookup(num29)

local pauser = reaper.GetToggleCommandState(statt)

reaper.CF_SetClipboard(mooner )
if pauser == 0  then
statt5 = " off "
elseif pauser == 1 then
statt5 = " on "
elseif pauser == -1 then
statt5 =""
end

if  num2  ~= "nil" then
   local str_showmenu = num2 ..    statt5 .. "|"
str_showmenu2  = str_showmenu2 .. str_showmenu
menu1 = menu1 +1
else
break
end
end


    
    
    
        SHOWMENU5 = gfx.showmenu(str_showmenu2);
OO1 =         SHOWMENU5

pp =2
                local  OOR = string.match(string.reverse(OO1),".+",pp+1)
                local  OORR = string.reverse(OOR)
num11, num22 = reaper.BR_Win32_GetPrivateProfileString("actionsNumber", OORR, "nil", pathfull)

stats = reaper.MIDIEditor_LastFocused_OnCommand(tonumber(num22),0)




