I have a basic javascript which works within an Action... However I want to control Photoshop from outside the application (in a bigger script/project).
Basic Code
var numberOfPaths = activeDocument.pathItems;
if (numberOfPaths.length < 1) {
'DO SOMETHING HERE - E.g. copy file to folder'
} else {
'DO SOMETHING ELSE E.g. log and do nothing with it'
}
I am trying to open up an image (one-by-one), and check to see if it has a path, then depending on the If/Else statement, do something with it.
I've searched around and haven't found anything that meets what I am trying to do. I am not familiar with Javascript, more into Python. I've tried to do something like below, targeting photoshop similar to how you would in Applescript. Though I'm at a loss.
...
Photoshop = Application('Adobe Photoshop CC 2014');
var docRef = Photoshop.open ('PATH/TO/FILE');
var numberOfPaths = Photoshop.activeDocument.pathItems;
...
Any help would be appreciated. Cheers!