Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

And or statements

$
0
0

Trying to delete everything that has a certain stroke color and *either* has a width or hieght of less than 7.

 

var docRef = app.activeDocument;

var selectedObjects = docRef.selection;

var CC = app.activeDocument.swatches.getByName ("CutContour").color;

for(i = docRef.pathItems.length-1; i >= 0; i--){ 

if(docRef.pathItems[i].strokeColor = CC && docRef.pathItems[i].width < 7 || docRef.pathItems[i].height < 7) 

{  

  docRef.pathItems[i].remove();

 

 

I can get it to work for just the stoke color, and the width or height, but not all 3 together.

 

Thanks in advance, lots of helpful people on here and I really appreciate it.


Viewing all articles
Browse latest Browse all 12845

Trending Articles



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