user-defined script locations?

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

jdm

user-defined script locations?

Post by jdm »

Hi,

I'm looking for a place to put PS scripts that doesn't alter the PS installation dir. I'd like to have a 'user scripts' directory, or one pointed to via an environment variable if I could do such a thing. It would be easier for networked users on different machines to all see the same scripts if I could do that.

Is the only place to put scripts so that they will be found automatically in the Photoshop application directory ( PSCS2 > Presets > Scripts )?

I see that startup scripts may be placed in a user's Library location:
~Library/Application Support/Adobe/StartupScripts

Bur I don't think that is what I want. It looks like those are executed automatically at startup, and the scripts we have are intended to be run when a user decides, not at startup.

Is everyone here just putting scripts into the PS application dir? Is that the only option? Could anyone suggest alternatives?

thanks for any suggestions.

_jason

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

Norbert

user-defined script locations?

Post by Norbert »

I am totally new to scripts, basically no clue, but I think one could use ah script lister to pull up scripts (inside PS nontheles) on any machine then select the scipt and run it.
What's wrong to have a few hundred scripts in Preset/Scripts?
xbytor

user-defined script locations?

Post by xbytor »

It basically makes the File->Scripts menu useless. That menu really needs to be hierarchical for it to be useful for more than a dozen or two scripts.
w2ed

user-defined script locations?

Post by w2ed »

You could make an alias (a file linking to another folder or file) of the folder on the network and place that within the presets folder. That might work. (Or, if you're using AppleScript for the scripting, you could just create a program that links to the server.)

Wayne C. Winquist
jdm

user-defined script locations?

Post by jdm »

Hi,

So I have found that it is possible to make an action that calls a script. The script run can be browsed to, and the path is recorded in the saved action.

And, actions can be saved per-user, so this would be one roundabout way to have different users being able to drive different scripts, that do not have to live in the PSCS2 application directory.

One hassle is that action files (.atn) appear to be saved as binary, and there is no easy way to text edit these as I can see. The editing inside Photoshop is very limited - there is no 'Edit Actions'?. So, to alter paths will require changing the binary file, just more work, but doable.

Is anyone else distributing or configuring Photoshop in this manner? Any suggestions are welcome. What I'm trying very hard to avoid is placing anything in the application folders directly, for me that just keeps things much much cleaner.

thanks,

_jason
xbytor

user-defined script locations?

Post by xbytor »

First off, in CS and CS2, you can adjust some settings on an Action step by double clicking on that step, which basically re-records whatever you did letting you specify new options. Very handy, but not particularly useful here.

jdm wrote:One hassle is that action files (.atn) appear to be saved as binary, and there is no easy way to text edit these as I can see. The editing inside Photoshop is very limited - there is no 'Edit Actions'?. So, to alter paths will require changing the binary file, just more work, but doable.

Yep. I've done it. And reading .atn files is not a simple task. I can covert an Action from an .atn file to an XML DOM or XML string/file, translate it into Javascript, or load it into Javascript data structures.

Is anyone else distributing or configuring Photoshop in this manner?

In my XToolkit Beta release http://ps-scripts.com/bb/viewtopic.php?t=201 I do exactly this. In the script Install.js, I take an Action file that I created that calls a bunch of my scripts and I change all of the script paths (that were correct for my machine) to paths that are correct for the machine on which the toolkit is installed. The technique I used involved loading the action file, converting it to an XML string, running String.replace with an interesting bit of RegExp code, then convert the XML string back and save it to a new .atn file. Works like a charm. I'll eventually pull this functionality out of the Install script since others have asked about this as well.

Any suggestions are welcome. What I'm trying very hard to avoid is placing anything in the application folders directly, for me that just keeps things much much cleaner.


A Script Search Path preference would also go a long way towards addressing this problem.