• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

add context menu

Explorer ,
Mar 30, 2013 Mar 30, 2013

Copy link to clipboard

Copied

I try to add a context menu item like this, but it does not show up:

main();

function main() {

   
    var myLayoutContextMenu = app.menus.item("$ID/RtMouseLayout").submenus.add('New menu');

}

Can someone help?

TOPICS
Scripting

Views

631

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 31, 2013 Mar 31, 2013

Copy link to clipboard

Copied

LATEST

Hi,

you've got to add a menu item to the submenu. Seems that a empty one isn't displayed ...

contextMenu = app.menus.item("$ID/RtMouseDefault"); 
     sma = app.scriptMenuActions.add("a new menuitem"); 

sbm = contextMenu.submenus.add("someTest");

sbm.menuItems.add(sma);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines