[Mac] Linking to a folder placed on a NAS

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

User avatar
jaydoubleyou80
Posts: 20
Joined: Mon Oct 17, 2016 1:41 pm
Location: USA

Re: [Mac] Linking to a folder placed on a NAS

Post by jaydoubleyou80 »

I have a very similar allergy to Windows machines :lol:

I always take for granted that #target Photoshop is the first line, but haven't needed to bring it to the front, as that seems to happen automatically for me.
User avatar
Scriptor
Posts: 24
Joined: Tue Oct 01, 2019 12:07 pm

Re: [Mac] Linking to a folder placed on a NAS

Post by Scriptor »

Hey - I realized that I did not post a proper answer.

The easiest fix I found to this was to place a temporary .psd-file in the folder I wanted to link to, then run this snippet;

Code: Select all

selectedfile = app.openDialog();
alert("Selected Location: \n" + selectedfile);
And just using whatever output I got from the above snippet (minus the temporary psd-file ofcourse). So an example usage (in Mac) would be;

Code: Select all

var psdname = "whatever";
var psdpath = new Folder ("/Photostudio/Resources/PSD");		//If it's on a server
//var psdpath = new Folder ("~/Desktop/");				//If it's on the desktop
var psdfile = new File(psdpath + "/" + psdname + ".psd");
I know that the above isn't pretty;)