What problem do have with the code?
For Acrobat/Reader DC:
For Acrobat X you need to change the "DC" folder to "10.0"
None of these are detecting when no more active docs are open.
How are you executing the code, exactly?
At this case the function returns nothing.
I do not have option of adding folder level scripts to user's computers. This needs to be self contained within action wizard user imports into Adobe.
I want to figure out when there are no active documents and then delete the global variable.
Here is the code I am trying to use:
var dd = app.activeDocs
if (dd.length ==0)
app.alert ("it worked")
It is not working though. I get no app alert after there are no more active documents.
You can't. A folder level script is required in order to create a privileged function to return the actual number of active documents.
That doesn't make sense. The entire point of an Action is that it opens a file and then performs some actions on it, so activeDocs will never be empty if you use it in that context.
I understand that point of action wizard is to perform actions on documents. I am trying to figure out how perform one last action after all actions have been performed (i.e. No active documents) So I can clear the global variable. I have do this without using a folder level script bc that is not an option for me.