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?
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.
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?
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?
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.
I thought of this too. It seems to work so far. Thank you.