6 Replies Latest reply on Aug 29, 2014 2:13 AM by Alexito

    marquee zoom

    Alexito

      Is it possible to execute short cuts using JS? or event call the marquee zoom by click on the custom button created with JS (app.addToolButton({...})?

      It would be nice, that all buttons/functions which I need  are collected on one place using JS.

       

      Thanks and regards,

      Alex

        • 1. Re: marquee zoom
          try67 MVP & Adobe Community Professional

          You can simulate clicking on various buttons in the GUI by using the

          execMenuItem method of the app object.

          • 2. Re: marquee zoom
            Alexito Level 1

            I printed all the menu items and found out, that marquee zoom has a value "Zoom":

            [cName:ZoomSubMenu, oChildren:[[cName:ZoomTo],[cName:Zoom],[cName:ZoomDrag] ....


            Unfortunately app.execMenuItem("Zoom") doesn't execute this item and no error is shown. ZoomTo and ZoomDrag are executed.

            What problem it might be here? I have the XIth version of Acrobat Pro.

             

            var zoom = app.trustedFunction(function () {

                app.beginPriv();

                app.execMenuItem("Zoom");

                app.endPriv();

                console.println("Zoom!");

            });

            • 3. Re: marquee zoom
              MichaelN Level 3

              Have you thought about a script to modify the document's zoom property?

               

              Here are a few examples:

               

              this.zoom *= 2;   //zooms to double the current zoom level

              this.zoom *= 0.5;   //zooms to 50% of the current zoom level

              this.zoom = 200;   //zooms to 200%

              • 4. Re: marquee zoom
                Alexito Level 1

                Yes, I tried it as well. I need the marquee zoom, as it zooms exactly to the chosen field. Could I activate the marquee zoom on the tool bars using JS? As not every body knows about it my custom toolbar would active it.

                • 5. Re: marquee zoom
                  George_Johnson MVP & Adobe Community Professional

                  Are you wanting to have it zoom to a particular area of the page. or do you just want the user to be able to do this manually?

                  • 6. Re: marquee zoom
                    Alexito Level 1

                    Second possibility, that the user could be capable of using marquee zoom.