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

129

Likes

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

Most Valuable Participant , 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.

Likes

Translate

Translate
Most Valuable Participant ,
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.

Likes

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?

Likes

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?

Likes

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
Most Valuable Participant ,
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.

Likes

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.

Likes

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