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
Access Paths in photoshop is possible ?
-
pfaffenbichler
Access Paths in photoshop is possible ?
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}
};
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}
};