• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

What order are actions processed in Acrobat Pro DC?

Participant ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

I created an action script that does a lot of things after collecting information in a popup dialog.  I need the dialog to appear only once at the beginning of the action so I the dialog conditional on whether a global variable is defined.  The dialog only runs if the variable is undefined.  The dialog defines the variable so the popup does not run again.  I need to delete the global variable after the files are processed so I created a file called zzzz.pdf that does this.  In Windows, it seems the files are always processed alphabetically so zzzz.pdf is always processed last (exactly what I want).  When it runs on a Mac the zzzz file is processed somewhere in the middle of file list which messes up the action.  Is there an order in which files are processed in an action and if there is, why can't my Mac user get zzzz.pdf to process last?  Does any one know of another way that will make the dialog only pop up once at the beginning of the action?

TOPICS
JavaScript

Views

506

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 10, 2021 Apr 10, 2021

That might work... Worth a shot. Another option I thought of is to add all the files except for "zzzz" first, and then add it separately on its own. If you do it like that it will probably add it to the end of the list.

Votes

Translate

Translate
Community Expert ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

Your method of doing it is good, but there's no guarantee the files will be processed in any specific order, unless you add them in that order, one by one. An alternative is to use a separate script to clear the global variable after running the Action (but then you have to remember to click the button that runs this script when done), or simply restart Acrobat after each run.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

Thank you for your answer.  In Windows, it seems the files are always processed alphabetically.  If I add use "add files" instead of "add folder" and then select all but zzzz to add, then add just zzzz separately do you know if it will always get processed last processed last?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

I just thought of a potential workaround.  Please let me know what you think.  Will it process all of the files in the folder first before processessing and subfolder files?  I could put zzzz into a subfolder by itself.  Your thoughts?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 10, 2021 Apr 10, 2021

Copy link to clipboard

Copied

That might work... Worth a shot. Another option I thought of is to add all the files except for "zzzz" first, and then add it separately on its own. If you do it like that it will probably add it to the end of the list.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 10, 2021 Apr 10, 2021

Copy link to clipboard

Copied

LATEST

I thought of this too.  It seems to work so far.  Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines