Code: Select all
try {
var aDoc = app.activeDocument;
var allPathItems = aDoc.pathItems;
var aPath = aDoc.pathItems.getByName("stone");
// alert('The pathItem: '+aPath.name+' was found');
// do whatever you want
} catch(e) {
// alert(e.message+': '+e.line);
// do nothing
}