Using variables across different scripts

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
DavideBarranca
Posts: 16
Joined: Tue Jul 26, 2016 2:12 pm

Re: Using variables across different scripts

Post by DavideBarranca »

StoryCave wrote: Is there a universal default script folder path line I could use across both PCs and MACs ? like this one : .../Photoshop CC 2015/Presets/ Scripts
That one is the only default script path I'm aware of.
Which is version dependent, so I'm afraid you always need to perform some maintenance when new versions appear. What has been suggested in the past, is to keep your script sources in a single folder (where you find it more convenient) and alias that folder in the various Presets/Scripts.

Mind you, Adobe is now suggesting to deploy filters in a shared, from CC-onwards location. So plugins have a truly version-independent folder. That's not the case of Scripting, you can add a feature request for that!

Davide
User avatar
StoryCave
Posts: 20
Joined: Wed Sep 21, 2016 2:14 pm

Re: Using variables across different scripts

Post by StoryCave »

Thanks Davide, haven't even thought of using an alias for the script folder, that's interesting.
Since it's very package version and system dependent I'll then leave that to the users.

Cheers.

K.
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: Using variables across different scripts

Post by Kukurykus »

I use alias for script folder too in my company where are 12 computers with Photoshop. That would be boring each time I do update to load to each computer new version of old scripts or just new scripts and some additions. I simply save them in folder I keep on server and then when someone launches Photoshop on his computer, an alias connects with server folder from that computer Presets/Scripts folder of Photoshop. There is no matter someone uses 32 or 64 bit or that is CS2 or CS6 or even else different language version.

Only when Windows or Photoshop is reinstalled I have to run that "Installer" script again to send aliases to some or all 12 computers. It's convinient as this Installer script detect which computer is on, what PS version is installed and is that 32 or 64 bit to send an alias to proper folder.

I don't use fortunately CC and plugins, but I hope that only one cloud folder won't be the only option for them in some future as it is not so comfortable with sending / installing them like still that is with scripts where your graphics employers don't need to know anything about plugins, scripts and generally computers what is not a thing of their graphics work.

One disadvantage I remember I had using Windows 7 was that this method I described above wasn't fast. If I had some polyfill script or other with some functions etc or else I had not them then each time some photoshop read scripts from server by alias it took to many seconds, not mentioning there was loop and updated information that the process was slow and annoying. Now when I use on all computers Windows 10 there is no problem. I don't know what was done but connecting computers with server is very smooth and there is no difference scripts were loaded directly to somone's comp.
Last edited by Kukurykus on Sun Sep 25, 2016 10:27 pm, edited 1 time in total.
User avatar
StoryCave
Posts: 20
Joined: Wed Sep 21, 2016 2:14 pm

Re: Using variables across different scripts

Post by StoryCave »

That's definitely something I'll look into, since my scripts will be public I guess it'll start with a manual system.
I'd like to see in the future if I can make a plug in that would store all these scripts. I do hope too that the cloud won't become the only solution, it's already a shame that the library can only be accessed through the cloud.