Answered
JSX - Open File in Photoshop
Hi everybody,
I've been working on this for close to a day. I can't get a file to open in Photoshop no matter what I try to do with something thatI would imagine is relatievly straight-forward.
This is the script I'm using in VSCode:
// current file path
var filePath = new File($.fileName).parent;
alert(filePath); // works
var fileRef = filePath + "/PSD/test.psd";
alert("file in question: " +fileRef);
// file in question: "~/Documents/adobe_scripts/PSD/test.psd"
alert(fileRef.exists); //undefined
var docRef = app.open(filePath);
// end of script
I keep getting 1230 and 1233 argument errors. I've tried to eval, toString, typeOf, trying to figure out why it just won't open...?
This is a basic direct reference to a path/file. Is there something right under my nose that I'm missing? If anybody could provide some insight I'd be thrilled.
Thanks!
-m
