Skip to content

Instantly share code, notes, and snippets.

@grefel
Last active February 13, 2016 15:41
Show Gist options
  • Save grefel/730cecc7a7d9e47de087 to your computer and use it in GitHub Desktop.
Save grefel/730cecc7a7d9e47de087 to your computer and use it in GitHub Desktop.
Wait for Process / Fix InDesign Threading Problems
var oldPreflight = app.activeDocument.preflightOptions.preflightOff;
app.activeDocument.preflightOptions.preflightOff = false;
// wait a maximum of 20 second for the preflight process. Before it runs, all Transactions should be closed.
app.activeDocument.activeProcess.waitForProcess(20);
app.activeDocument.preflightOptions.preflightOff = oldPreflight ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment