2 Replies Latest reply on Dec 19, 2011 1:09 AM by snegig

    Remove menu for InDesign CS4

    snegig Level 1

      Hi,

      Can anyone suggest me how i can remove this menu of my InDesign CS4 Application.

       

      (I)

      2.png

       

       

      (II)

      1.png

       

       

      Actually i run this script below ???????

       

       

       

      #targetengine "myTestMenu"

      var myFolder = Folder(app.activeScript.path);

      myFolder = myFolder.parent + '/Scripts Panel/';

       

       

      var menuItem1Handler = function( /*onInvoke*/ ){

        app.doScript(File(myFolder + 'MyTest1.jsx'));

      };

       

       

      var menuItem2Handler = function( /*onInvoke*/ ){

        app.doScript(File(myFolder + 'MyTest2.jsx'));

      };

       

       

      menuInstaller()

      function menuInstaller() {

        var menuItem1T = "My Menu Item 1",

             menuItem2T = "My Menu Item 2",

             menuT = "MyTestMenu",

                   subT = "Sub Menu",

             subs = app.menus.item("$ID/Main").submenus, sma, mnu;

        var refItem = app.menus.item("$ID/Main").submenus.item("$ID/&Layout");

       

       

        subMenu1 = app.scriptMenuActions.item(menuItem1T);

        if( subMenu1 == null ) {

                subMenu2 = app.scriptMenuActions.add(menuItem1T);

        }

       

       

        subMenu2 = app.scriptMenuActions.item(menuItem2T);

        if( subMenu2 == null ) {

                subMenu2 = app.scriptMenuActions.add(menuItem2T);

        }

        subMenu2.eventListeners.add("onInvoke", menuItem2Handler);

       

       

        mnu = subs.item(menuT);

        if( mnu == null ) {

                  mnu = subs.add(menuT, LocationOptions.after, refItem);

        }

        mnu.menuItems.add(subMenu1);

        mnu.menuSeparators.add();

       

       

        subsSubs = app.menus.item( '$ID/Main' ).submenus.item( menuT ).submenus;

        mnuSubMenu = subsSubs.item( subT );

        if( mnuSubMenu == null ) {

                mnuSubMenu = subsSubs.add( subT);

        }

       

       

        mnu.menuItems.add(subMenu2);

      };

       

       

      Thank's

      Regards

      snegig