Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Find path name

$
0
0

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!


Viewing all articles
Browse latest Browse all 12244

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>