Now (in the development version), you can see not only the UUID, but also service names
Knowing the name of the service that a menu item is associated with, you can add the same menu item to another menu using the MirLua plugin
Let's add an "Exit Miranda" menu item to the contact list menu. As you can see in menu editor, the "Exit" menu item (from the main menu) is implemented by calling the "CloseAction" service (see screenshot)
Install MirLua plugin and create a simple Lua script inside \Miranda NG\Scripts folder
AddExitMenuItem.lua:
local clist = require("m_clist") -- we want to modify contact list menu, so we need to import m_clist Lua module and we will call it "clist"
local icolib = require("m_icolib") -- we want to add an icon to our new menu item, so we need to import m_icolib Lua module and we will call it "icolib"
clist.AddGroupMenuItem({ -- as we want to add group menu item, we should call AddGroupMenuItem function from clist
Name = "Exit Miranda", -- name of the menu item (will be shown in the groups menu)
Service = "CloseAction", -- what service calls this menu item (we created this service function above)
Icon = icolib.AddIcon('exit', 'Exit!'), -- as we want to add icon to our menu item and put it to Customize -> Icons -> MirLua, we should call AddIcon function from icolib
Uid = '75EA040D-AC0E-40FA-9A3C-878210B0642C' -- unique GUID, you can create one on https://www.uuidgenerator.net/guid. All that is required of it is to be unique among all your scripts
})
Save script and restart Miranda or use "Reload scripts" button in Options -> Services -> MirLua
Congratulations, you have added a new menu item!
Now you can add more menu items
clist.AddGroupMenuItem({
Name = "Main menu",
Service = "MainMenu/Command",
Icon = icolib.AddIcon('mainmenu', 'Main menu'),
Uid = '75EA040D-AC0E-40FA-9A3C-878210B06421'
})
clist.AddGroupMenuItem({
Name = "Status",
Service = "GlobalStatus/Command",
Icon = icolib.AddIcon('status', 'Status'),
Uid = '75EA040D-AC0E-40FA-9A3C-878210B06422'
})
clist.AddGroupMenuItem({
Name = "Options",
Service = "Options/OptionsCommand",
Icon = icolib.AddIcon('options', 'Options'),
Uid = '75EA040D-AC0E-40FA-9A3C-878210B06423'
})
clist.AddGroupMenuItem({
Name = "About",
Service = "Help/AboutCommand",
Icon = icolib.AddIcon('about', 'About Miranda'),
Uid = '75EA040D-AC0E-40FA-9A3C-878210B06424'
})
clist.AddGroupMenuItem({
Name = "Exit Miranda",
Service = "CloseAction",
Icon = icolib.AddIcon('exit', 'Exit!'),
Uid = '75EA040D-AC0E-40FA-9A3C-878210B06425'
})
Maybe we will implement menu item creation directly in the menu editor in the future.