Using Javascript with Photoshop CC (on Windows), I'm trying to create a script that will create a new document of certain dimension size, open an existing image alongside it, and paste it in as a new layer.
My problem is, I can only open the existing image when I supply the absolute path as follows:
var fileRef = new File("C://Users//James//Desktop//images//image01.jpg");
I had thought (obviously incorrectly since it won't work) that I could just specify the name of the file in the call to the new File object, e.g.:
var fileRef = new File("image01.jpg");
but this returns an 1233 error, i.e. "Expected a reference to an existing file or folder" so obviously the script can't see the file.
Is there a way to provide a relative address? This is for an assignment which will be viewed on a Mac so providing an absolute address which works on my PC isn't much good.
Thanks.