7 Replies Latest reply on Mar 21, 2011 9:49 PM by Jo_2005

    How to Lock the Plug in Add on Tools in Adobe X?

    Jo_2005 Level 1

      Hello,

       

      I have a folder level javascript with a tool button installed on users hard drives.

       

      Those with Adobe Reader 8 and 9 shows the add on tool button automatically.

       

      Those with Adobe Reader X have to use the steps as follows to show the plug in tools

       

      show tools pane

      extended features

      Plug in add on Tools

       

      The user has to follow all of the above steps each time a document is opened to click on the tool button.

       

      This can become time consuming when many documents need to use the tool button consecutively.

       

      Is there a way to lock the tool button so the user just has to click the tool button when a document is opened in Reader X?

       

      Any assistance will be most appreciated.

       

      Thank you

        • 1. Re: How to Lock the Plug in Add on Tools in Adobe X?
          George_Johnson MVP & Adobe Community Professional

          Try adding the button using the information here: http://acrobatninja.blogspot.com/2011/03/enterprise-toolbar-customization-in.html

           

          Although Reader doesn't have a visible Quick Tools toolbar, it does have one. Scroll down to the bottom of that article for Reader-specific information. I haven't tried this, but you can.

          1 person found this helpful
          • 2. Re: How to Lock the Plug in Add on Tools in Adobe X?
            Dave Merchant MVP & Adobe Community Professional

            In response to a question about finding the internal name of a custom button (such as one added using a folder-level JavaScript):

             

            The app.addToolButton() method for Acrobat 9 and earlier uses the cName parameter to define the internal name of the tool and posts it to a special "Add-on" toolbar, for example:

             

            app.addToolButton({
              cName: "myToolButton",
              cExec: "app.alert('Someone pressed me!')",
              cTooltext: "Push Me!",
              cLabel: "My Button",
              cEnable: true,
              nPos: 0
            });

             

            In Acrobat X this function will create a new pane in the Tools Panel called "Plug-in Add-on Tools" if it's not already present, and post the button there rather than on the system toolbar or Quick Tools area; but the internal name of the resulting button used by the registry preferences will have the prefix "_legacy:". In this example, if you create a button using the above script and are referring to the button in the Acrobat X registry keys to pre-populate the button into the Quick Tools area, you should use the name

             

            _legacy:myToolButton

             

            However the button itself still has the internal name "myToolButton", so if you try to create it a second time, the script will fail because the name "myToolButton" is no longer unique. Don't use the "_legacy:" prefix in your button-creation script.

             

            Note that in Acrobat X 10.0 you cannot use the app.removeToolButton() method to remove any buttons from anywhere (the toolbars or the Panes), nor can you use the app.listToolbarButtons() function to return an array of all the objects; as the API has no direct connection to the toolbars or Panes. When a script tries to create a new button the Acrobat X API diverts the function call to the Tools Pane, but it's strictly a one-way conversation.

            1 person found this helpful
            • 3. Re: How to Lock the Plug in Add on Tools in Adobe X?
              George_Johnson MVP & Adobe Community Professional

              Dave,

               

              Thanks for posting this. It would make a good follow-up blog post.

              • 4. Re: How to Lock the Plug in Add on Tools in Adobe X?
                Dave Merchant MVP & Adobe Community Professional

                Yeah I will, thanks - just investigating why something in the API isn't working properly first... Pandora's Box time!

                • 5. Re: How to Lock the Plug in Add on Tools in Adobe X?
                  Jo_2005 Level 1

                  Thank you very much for your valuable assistance.

                   

                  I have used your example as a trial  to add the tool button to the system toolbar in Adobe Reader X except the button is not showing.

                   

                  In the registry editor under AVGeneral tried in both cCommonToolsDesktop and cFavouritesCommandsDesktop, I have added a new string value as follows:

                   

                  Name _legacy:myToolButton       Type  REG_SZ     Data   _legacy:myToolButton

                   

                  Also tried ..........

                   

                  Name _legacy:myToolButton       Type  REG_SZ     Data   myToolButton

                   

                  I am not sure what the Data value should be called?  Is this where I could be going wrong?

                   

                  Look forward to your reply.

                   

                  Thank you once again.

                   

                  Best Regards

                  Jo

                  • 6. Re: How to Lock the Plug in Add on Tools in Adobe X?
                    George_Johnson MVP & Adobe Community Professional

                    Jo,

                     

                    The name of the string value should be "a0", or "a1", etc. So to summarize, under the following registry key:

                     

                     

                    HKCU/Software/Adobe/Adobe Acrobat/10.0/AVGeneral/cFavoritesCommandsDesktop

                     

                    Add the following string value:

                     

                    Name: a0

                    Type: REG_SZ

                    Value: _legacy:myToolButton

                     

                    assuming the cName of the button you added is "myToolButton".

                    • 7. Re: How to Lock the Plug in Add on Tools in Adobe X?
                      Jo_2005 Level 1

                      Thank you so much for your reply George.

                       

                      I have been able to successfully add the custom tool buttons to the cFavouritesCommandsDesktop as follows:

                       

                      Name: a0      Type: REG_SZ     DataValue: _legacy:myToolButton

                      Name: a1      Type: REG_SZ     DataValue: _legacy:Checked

                      Name: a2      Type: REG_SZ     DataValue: _legacy:Designed

                      Name: a3      Type: REG_SZ     DataValue: _legacy:Approved

                      Name: a4      Type: REG_SZ     DataValue: _legacy:DesignApproved

                       

                      I am most grateful for all your help, there is no way I could have figured this one out by myself.