Quantcast
Channel: Adobe Community : Discussion List - Illustrator Scripting
Viewing all articles
Browse latest Browse all 3671

Pause or Wait Between Commands...

$
0
0

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

 

 

//Print

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();


Viewing all articles
Browse latest Browse all 3671


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>