The below is a portion of a larger script I have... What I'm wanting to do is place a Pause/Wait/Sleep (whichever is appropriate) command to wait on the item to finish printing before proceeding to the next section...
I've added the sleep function... but it doesn't appear to be working or is not understanding what I'm wanting it to do...
Any Ideas
var storeUserInteract = userInteractionLevel;
var d = activeDocument;
var jbOpts = new PrintJobOptions();
var opts = new PrintOptions();
opts.printPreset = "JEFF_HP";
opts.jobOptions = jbOpts;
userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
d.print(opts);
userInteractionLevel = storeUserInteract;
$.sleep (10000);
//Through Cut Backward
function wrapper()
{
var docRef = app.activeDocument;
var layers = docRef.layers;
var artLayer = layers["Artwork"];
var thruCutLayer = layers["Through Cut"];
function bringThruCutForward()
{
thruCutLayer.zOrder(ZOrderMethod.BRINGTOFRONT);
}
function sendThruCutBackward()
{
thruCutLayer.zOrder(ZOrderMethod.SENDTOBACK);
}
sendThruCutBackward();
}
wrapper();