15 Replies Latest reply on May 22, 2017 1:48 PM by Thom Parker

    Filename Stamper

    zimbop Level 1

      I'm trying to use an action by Rick Borstein called "Filename Stamper" (File_Name_Stamper.sequ) which is totally awesome (thanks Rick!), but requires that I click OK every time for each document when I have selected multiple files with the file open dialog box. This got a little tedious after the first few hundred - is there a way around this?@

        • 1. Re: Filename Stamper
          try67 MVP & Adobe Community Professional

          What is the dialog box asking you to confirm, exactly?

          • 2. Re: Filename Stamper
            zimbop Level 1

            Here it is: https://acrobatusers.com/actions-exchange/file-name-stamper-for-acrobat-xi

             

            The javascript window pops up and you click "Apply" for each one of the 'N' documents you selected, which is a total bummer if N=1000!

             

            Screen Shot 2017-05-22 at 15.54.50.jpg

            • 3. Re: Filename Stamper
              zimbop Level 1

              I should add I've tried using various keys such as control, option etc. as sometimes in MacOS these lead to OK being changed to "OK to all" etc. Wondering if Acrobat has any similar tricks.

              • 4. Re: Filename Stamper
                try67 MVP & Adobe Community Professional

                What version of Acrobat are you using?

                • 5. Re: Filename Stamper
                  zimbop Level 1

                  The very latest cloud version. The action works beautifully, it's just this issue with having to "Apply" to every file.

                  • 6. Re: Filename Stamper
                    zimbop Level 1

                    I've just seen in the docs that you can edit the action ... I think it's a case of more research into actions to find out how to get it to just process everything that's open, that would work for me. I'd thought it was a sort of self-enclosed script.

                    • 7. Re: Filename Stamper
                      try67 MVP & Adobe Community Professional

                      Something to try: Go to Edit - Preferences - JavaScript and make sure that "Enable global object security policy" is NOT ticked.

                      • 8. Re: Filename Stamper
                        zimbop Level 1

                        I unchecked that, seems to be the same. There's a massive piece of javascript in the action. I think it's a case of modifying that to simply process all open docs. I'll need to study it for some time, it\s not something I've spend a lot of time doing. I've only ever hacked at stuff like this to mod it (just, this is the biggest I've seen!)

                        • 9. Re: Filename Stamper
                          Thom Parker Adobe Community Professional

                          Hello Zimbop,  I'm the original author of that Action. I wrote it for Rick.  And you are not the first person to ask for the dialog to only come up once. And I created that variation. So if your interested, send me an email.  thomp@windjack.com

                          • 10. Re: Filename Stamper
                            try67 MVP & Adobe Community Professional

                            That's what the Action does. The code should save the selected values once and then use them for the rest of the files processed by the Action. If that's not what it's doing it will need to be adjusted to do so. I had assumed that's how it worked, as it makes the most sense, but didn't go into it very deeply, so I can't say for sure.

                            • 11. Re: Filename Stamper
                              Thom Parker Adobe Community Professional

                              Gilad and Zimbop, the issue with action scripts is that the DOM provides no info about the file's order in the process. The script doesn't know if a file is the first in the process, or the last.  Since the JavaScript model doesn't provide any info on this, then you have to create some method for detecting the first document. That's the trick.

                              • 12. Re: Filename Stamper
                                try67 MVP & Adobe Community Professional

                                Hi Thom,

                                 

                                Why is it important to know which file is being processed? You just need to check if the global object exists (which you already do in the code). If it doesn't, display the dialog and collect the settings from the user. If it does, use the values from it.

                                The only potential downside is that if the Action is then run again it will use the same settings, but there are ways around that too (like adding a menu item to reset those settings, or simply by restarting Acrobat).

                                • 13. Re: Filename Stamper
                                  Thom Parker Adobe Community Professional

                                  Yes, you could add a menu or toolbar button, or a command, to set the options, but then you'd have both the action plus this thing. I find a better method is to create a summary document. That way the code is all contained in the action, much easier for the user to install. And the summary document is a visual reminder that everything processed is using the same parameters.  As well as containing some useful info. For example, it can show status for document that can't be processed if there is security on the doc, or is XFA.

                                   

                                  The current code only checks the globals so it doesn't have to recreate the dialog each time.

                                  • 14. Re: Filename Stamper
                                    try67 MVP & Adobe Community Professional

                                    Isn't that the issue, though? That it does show the dialog for each file...?

                                    • 15. Re: Filename Stamper
                                      Thom Parker Adobe Community Professional

                                      The global isn't for showing the dialog, its for defining the dialog object.