[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: 21
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.

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

User avatar
Scriptor
Posts: 29
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;)