Question
Illustrator script that will select multiple objects with different names?
I've got this script to select only objects with the name "holes 1."
function selectPageItemsByName(items, name) {
for (var i = 0; i < items.length; i++) {
var item = items[i];
if (item.name === name) {
item.selected = true;
}
}
}
function main() {
var document = app.activeDocument;
var name = 'holes 1';
document.selection = null;
selectPageItemsByName(document.pageItems, name);
}
main();How do I get it to select objects with the name "holes 1" AND objects with the name "backs 1"?
