Copy link to clipboard
Copied
The code snippet below will place a new menu title "Automatic " after the "Help" menu in the Bridge main menu bar.
How can modify the snippet to add a submenu category with options:
For example:
Automatic
-- Category
---- Submenu 1
---- Submenu 2
---- Submenu 3
#target bridge
if( BridgeTalk.appName == "bridge" ) {
newMenu = new MenuElement( "menu", "Automatic", "after Help", "myMenu" );
RPP = new MenuElement( "command", "Menu Title", "at the end of myMenu","myAlert" );
};
RPP.onSelect = function () {
runMyScript();
}
function runMyScript(){
//add your code here
}
Please try this...
...#target bridge
if( BridgeTalk.appName == "bridge" ) {
//top menu
newMenu = new MenuElement( "menu", "Automatic", "after Help", "myMenu" );
//sub menu
newMenu2 = new MenuElement( "menu", "Category", "at the beginning of myMenu", "myMenu2" );
//sub menu
newMenu3 = new MenuElement( "menu", "Category II", "at the end of myMenu", "myMenu3" );
//menu items for Category
RPP = new MenuElement( "command", "Menu Title", "at the end of myMenu2
Copy link to clipboard
Copied
Please try this...
#target bridge
if( BridgeTalk.appName == "bridge" ) {
//top menu
newMenu = new MenuElement( "menu", "Automatic", "after Help", "myMenu" );
//sub menu
newMenu2 = new MenuElement( "menu", "Category", "at the beginning of myMenu", "myMenu2" );
//sub menu
newMenu3 = new MenuElement( "menu", "Category II", "at the end of myMenu", "myMenu3" );
//menu items for Category
RPP = new MenuElement( "command", "Menu Title", "at the end of myMenu2");
RPP2 = new MenuElement( "command", "Menu Title II", "at the end of myMenu2");
RPP3 = new MenuElement( "command", "Menu Title III", "at the end of myMenu2");
//menu items for Category II
XPP = new MenuElement( "command", "Title 1", "at the end of myMenu3");
XPP2 = new MenuElement( "command", "Title 2", "at the end of myMenu3");
XPP3 = new MenuElement( "command", "Title 3", "at the end of myMenu3");
};
Copy link to clipboard
Copied
Thank you again, it works great!