I have this script and it works for what I need except that it should overprint all dashed strokes. I would really appreciate any help.
function opKoBlackRules(doc) {
var ruleWidth = 2, grayColor = 100, counterOp = 0, counterKo = 0;
for ( i = 0; i < doc.pathItems.length; i++ ) {
var currentPath = doc.pathItems;
if ( currentPath.strokeWidth < ruleWidth
&& currentPath.strokeColor.gray == grayColor
&& currentPath.strokeOverprint == false ) {
currentPath.strokeOverprint = true;
counterOp++;
}
else if ( currentPath.strokeWidth >= ruleWidth
&& currentPath.strokeColor.gray == grayColor
&& currentPath.strokeOverprint == true ) {
currentPath.strokeOverprint = false;
counterKo++;
}
}
}