1 Reply Latest reply on Oct 21, 2008 10:23 AM by (silo)

    Getting locale-independant name of certain submenus

    Level 1
      Hello all,

      I could not find anything about this, I hope this is not due to sloppy looking...

      I am trying to create a menu command in the "Objcet > Select" submenu. Since not all users in Central Europe are working with a german InDesign I'd love to use the locale-independant denominators for all the menus, submenus and items concerned.

      These lines are how far I've got:

      var myMainMenu = app.menus.item("$ID/Main");
      var aSubMenu = myMainMenu.menuElements.item("$ID/Object");
      var aSubSubMenu = aSubMenu.menuElements[3];
      var bSubSubMenu = aSubMenu.menuElements.item("$ID/Select");
      var bSubSubMenu = aSubMenu.menuElements.item("$ID/Auswählen");


      The third line works, but is of course the worst solution and will fail in case someone added an item at the beginning of the object-menu.

      The fourth line does not work in a german InDesign, as far as I can tell.
      The fifth line should work, since "Auswählen" is the name of the submenu. But it doesn't.

      Wait a moment... if the third line works it should yield the internal name of the submenu...

      Yes, indeed. The line

      var bSubSubMenu = aSubMenu.menuElements.item("$ID/Aus&wählen");

      works.

      Which raises a new question: what gives with the &? Is there a simple way to explain when to expect the & to appear and how to find out?

      Thank you for any insight.

      Gerald
        • 1. Re: Getting locale-independant name of certain submenus
          Hi Gerald,

          in the "user interface programming world" the
          b &
          -character indicates that the following character is the shortcut for this menu entry.

          If you hold the
          b ALT
          -key, you can see how one char in each menu ist underlined, to access it via the keyboard.

          I'm afraid I don't know why this ampersand is part of the locale-independant denominators. Or let's better say why it's part of
          i some
          denominators, as "$ID/Object" doesn't have it.

          Silo