Is there a way to select pathItems base on stroke size and spotcolor?
Hi Everyone,
I am a entry level scriptor and I am currently stuck on this one specific step. I am trying to have a script loop through pathItems and select a path that matches these criterias:
- Stroke is using spotcolor name "BLACK" with No Fill
- Stroke is size at 2pt
I have found a script that loops through pathItems and selects paths with a specific point size, but I am having trouble add the part where it selects a path with the assign color "BLACK" on the stroke. Can anyone help me with this script?
// script.name = selectPathsThisSize.jsx;
// script.description = selects pathItems that have the same supplied stroke width; limited to 3 decimals;
// script.required = a document with at least one path item;
// script.parent = CarlosCanto // 6/5/11;
// script.elegant = false;
var idoc = app.activeDocument;
var strokewidth = 2
//prompt ("Enter Stroke Width in points of paths to be selected", 0.361, "Select Paths this size:___");
for (i=0 ; i< idoc.pathItems.length; i++) {
var ipath = idoc.pathItems;
if ((ipath.strokeWidth).toFixed(3) == Number(strokewidth).toFixed(3)) {
ipath.selected = true;
}
}
app.redraw();