Hello All,
I am new to photoshop scripting and i am learning. I want to write a code to "find the particular path with a alert box whether its is available in the file or not" i was trying and confused. i used "else" method but i couldn't get it right.
#target photoshop
var doc = app.activeDocument;
if (app.activeDocumen.pathItems.length > 0) {
app.activeDocument.pathItems[0].name = "Path 1"
} else {
alert ("There is no path name: Path 1", title, errorIcon)
}
also tried this one
#target photoshop
var doc = app.activeDocument;
if ( doc.pathItems.length > 0 ) {
app.activeDocument.pathItems.getByName('Path 1').select();
} else {
alert ("There is no path name: Path 1", title, errorIcon)
}
pls help me!