3 Replies Latest reply on Nov 12, 2012 3:19 AM by dulajun

    script error;

    rajnikids Level 1

      Hi there,

       

      I am trying to apply overprint to both colours; script is;

       

      var mydoc=app.documents.item(0);

      var myOPs=mydoc.pageItems;

      var myannos=mydoc.stories.everyItem().getElements();

       

      for (i=0;i<myOPs.length;i++) {

          var myOP=myOPs[i];

          //swatch name OP

      if (myOP.strokeColor.name=="Infill Magenta" | "Grid Cyan") {

          myOP.overprintStroke=true;

      }

      else if (myOP.fillColor.name=="Infill Magenta" | "Grid Cyan") {

          myOP.overprintFill=true;

      }

      }

      for (i=0;i<myannos.length;i++) {

          var myanno=myannos[i];

        

      if(myanno.fillColor.name=="Infill Magenta" | "Grid Cyan") {

          myanno.overprintFill=true;

      }

      }  // appliying overprint to fill/stroke/text object.

       

      no error message, but overprint applied only to Infill Magenta and not for Grid Cyan.