Access Paths in photoshop is possible ?

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

PCPV

Access Paths in photoshop is possible ?

Post by PCPV »

Hello, I'm new in the community and would like to know if I can access the Paths made ​​in Photoshop and interact skipping to the next higher or lower like a listbox eg.

I still use the Class paid ImageInfo by Kanzu of which has been discontinued for years and I'm afraid you can not use some time from now because it is already showing some "Bugs" and need their own solution for this.

I appreciate any help,

Tanks, Paul

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

pfaffenbichler

Access Paths in photoshop is possible ?

Post by pfaffenbichler »

Edited
Code: Select all// select the next path;
// 2012, use at your own risk;
#target photoshop
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
var thePath = selectedPathIndex ();
if (thePath != undefined) {
if (thePath != myDocument.pathItems.length) {myDocument.pathItems[thePath].select()}
else {myDocument.pathItems[0].select()}
}
};
////// determine selected path, updated 08.2011 //////
function selectedPathIndex () {
try {
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Path"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var desc = executeActionGet(ref);
var theName = desc.getString(charIDToTypeID("PthN"));
var theIndex = desc.getInteger(stringIDToTypeID("itemIndex"));
return theIndex
} catch (e) {return undefined}
};
PCPV

Access Paths in photoshop is possible ?

Post by PCPV »

Tanks for your Help pfaffenbichler !

Works Fine !