Before the BatchPlay runs, I am checking to see how many documents are open using
if(app.documents.length === 1){
showAlert("More than Document required to use this feature.")
}
//batchPlay code goes here...
Now if there is only 1 document open, the Alert pops ups and stops the batchPlay from executing.
At the end of the batchplay code I use the following to workaround the focus issue
menuCommand(2982);
menuCommand(2986);
menuCommand(2986);
Question:
Where should this code go so that it still works if the Alert pops up because leaving it at the end of the batchplay code doesn’t appear to do anythig