HOW GET THE CURRENT SELECTION PATHITEMS NAME USE SCRIPT?
HOW CAN I GET THE current selection Pathitems name use script??thank: )! ! ! ! !

HOW CAN I GET THE current selection Pathitems name use script??thank: )! ! ! ! !

Hi pjwaixingren,
Thanks to c.pfaffenbichler and Hope this will help you.
alert(selectedPath().name);
function selectedPath () {
try {
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Path"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var desc = executeActionGet(ref);
var theName = desc.getString(charIDToTypeID("PthN"));
return app.activeDocument.pathItems.getByName(theName)
}
catch (e){ return undefined ;}
};
- yajiv
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.