2 Replies Latest reply on Mar 29, 2013 11:21 PM by indegn5

    invoke() Change Format settings through script

    indegn5 Level 1

      Hi Forum!

       

      I can able to invoke Find and Change menu through this script.

       

      app.menuActions.item("Find/Change...").invoke();

       

      But, How can i invoke(). Change Format Settings: style Options;

       

      Can anybody advise me please.

       

      thanks

      bobs..

        • 1. Re: invoke() Change Format settings through script
          R-Bala-Krishnan Level 2

          Hi,

           

          By using  ID value

           

          app.menuActions.itemByID(18694).invoke();

           

           

           

          To get the list of ID value use b/m script - i download from Net.

           

          ====================================================

           

          var myActions = app.menuActions;

          var myActionsList = Array();

          var counter = Number(0);

           

          for(var i = 0; i < myActions.length; i++){

              myActionsList.push(String(myActions[i].name));

              myActionsList.push(String(myActions[i].area));

              myActionsList.push(String(myActions[i].id));

          }

           

          var myDoc = app.activeDocument;

          var myTextFrame = myDoc.pages[0].textFrames.add();

          myTextFrame.geometricBounds = app.activeDocument.pages[0].bounds;

           

          var myMenuActionsTbl = myTextFrame.insertionPoints[0].tables.add();

          myMenuActionsTbl.columnCount = 3;

          myMenuActionsTbl.bodyRowCount = myActions.length;

          myMenuActionsTbl.contents = myActionsList;

           

          ===================================================================

           

          Thanks and regards,

          Balakrishnan R

          • 2. Re: invoke() Change Format settings through script
            indegn5 Level 1

            waugh!

             

            thanks so much Bala,

             

            However Im trying to open the submenu Change Format...directly in  Find/Change Main menu.

             

            But the invoke ID found is only for Find and Change...

             

            would this be possible Bala...

             

            thanks for your great stuff.

             

            Bobs!.