Where do you want the submenu to appear? In the dialog menu, in the mirc menu, in a channel/nicklist menu, in a custom window menu?
If you are looking to add a submenu in the dialog, as far as I can tell, mIRC doesn't allow you to add/insert menus. You can add/insert/delete/enable/disable items within existing menus.
Here is a possible answer I came up with. It isn't perfect, because existing menus can't be overwritten, disabled, or hidden, apparently.
alias tmenu dialog -m testmenu testmenu
dialog testmenu {
Title Sample Menu
size -1 -1 100 50
option dbu
menu "Menu 1",1000
item "Item 1",1001
item "Item 2",1002
menu "Submenu",2000,1000
item "Item 3",1003,1000
item "Item 4",1004
button "Submenu",5,5 5 30 10
}
on *:DIALOG:testmenu:init:0:{
%submenu = 0
}
on *:DIALOG:testmenu:sclick:5:{
if (!%submenu) {
%submenu = 1
did -a $dname 2000 2001 Subitem 1
did -a $dname 2000 2002 Subitem 2
}
else {
%submenu = 0
did -d $dname 2001
did -d $dname 2002
}
}
The above example uses existing an existing submenu that has no items. When the Submenu button is pressed once, two new item are added into the Submenu. When the Submenu button is pressed again, those two new items are deleted.
-genius_at_work