Changing Action Scripts outside of Photoshop CS3

P
Posted By
PictureDude
Jan 29, 2009
Views
1322
Replies
13
Status
Closed
I did a search to see if anyone has figured this out, but I couldn’t find anything.

I have created several scripts that have been recorded on our main mac computer. They work great!

But when we take and copy them to a different computer, they don’t work, because our computer names are different. Everything is in the script, except maybe one name times 25 actions are wrong.

We’ll I opened the "TestAction" script using TextEdit and I see the words that need to be changed. When I made the changes and saved the file and then tried to load in Photoshop. It say’s the file is not compatible with Photoshop.

Anyone know a way to do this. It would be a huge time saving for me.

I have CS3 and CS4 and CS2 if there is anything else needed.

Thanks,

Gary

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

CP
christoph_pfaffenbichler
Jan 29, 2009
Are You talking about Scripts or Actions?
P
PictureDude
Jan 29, 2009
I’m speaking about the Actions that you record in Photoshop…

G
CP
christoph_pfaffenbichler
Jan 30, 2009
Hm, I suppose one could use xbytor’s »ActionToJavascript.jsx« and edit the resulting jsx-files in Extend Script Toolkit; but of course the result would be Scripts instead of Actions.
Other than that I frankly have no idea how to do that.
PR
Paul_R
Jan 30, 2009
Chistoph has got the right idea.
Using Xbytor’s Xtools you could use
ActionFileToXML.jsx
This will change the selected atn file to XML format so that you could use a text editor on the file. Once you have made the changes use ActionFileFromXML.jsx to re-create the atn file.
<http://www.ps-scripts.com/bb/viewtopic.php?t=2333>
CP
christoph_pfaffenbichler
Jan 30, 2009
Once again I looked in the right direction but missed the actual solution. Good catch!
MR
Mark_Reynolds
Jan 31, 2009
Another solution is to edit your actions on the destination computer. The only thing that changes with different machines are file locations. If you double click the saving and opening steps in the action panel, it will allow you to redefine these. This is WITHOUT using a text editor on the .atn file
PR
Paul_R
Jan 31, 2009
Yes but manual editing can be time consuming for the user if there are many actions to modify, also a lot of users do not have the Photoshop knowledge that you have.
I am in the process of writing a script that will install all the actions sets/scripts on different platforms and different versions of Photoshop and all the user has to do is run the install script.
P
PictureDude
Jan 31, 2009
I am in the process of writing a script that will install all the >actions sets/scripts on different platforms and different versions of >Photoshop and all the user has to do is run the install script.

Wow, That would be wonderful… We constantly have to redo our actions because of that.

All that changes is the location, so if I could use that script, it would be simple…

Please let me know when you have this done…

Gary
P
PictureDude
Jan 31, 2009
Using Xbytor’s Xtools you could use ActionFileToXML.jsx This will change the selected atn file to XML format so that you could >use a text editor on the file. Once you have made the changes use >ActionFileFromXML.jsx to re-create the atn file.

Wow, this sounds great. But i’ve only run a jsx script in Photoshop, on a picture.

So give me the basics on how to do this? What program to I open and then do I point to the Actions.atn that I created in Photoshop and save to make a file that I can edit.

And then I open that file and save it back to an ATN file?

Just a little more help please, I’ve not done that before.

Gary
PR
Paul_R
Jan 31, 2009
Yes I will e-mail you when I get it all sorted, I have one version working taylored for a certain installation, now need to test it on different platforms / Photoshop versions.
I would need to make it more generic for general use.
P
PictureDude
Feb 1, 2009
Paul,

I still would like to know how you do this scripting? Using what and how. I did download the toolbox you suggested…

Thanks,
PR
Paul_R
Feb 1, 2009
In a nutshell…

These are the two main scripts that you will need besides creating one that does the editing/loading.removing action sets.

< http://ps-scripts.cvs.sourceforge.net/viewvc/*checkout*/ps-s cripts/xtools/apps/ActionFileToXML.jsx >

< http://ps-scripts.cvs.sourceforge.net/viewvc/*checkout*/ps-s cripts/xtools/apps/ActionFileFromXML.jsx >

The first script ActionFileToXML.jsx is run on the action set, this will produce an editable XML file.

Edit this file and replace the path (leaving "/filename") with something you can find/replace with ie REPLACEME

The next thing is to create a script that will read in this xml file (to be run from Photoshop), replace the string with the correct path

In my case it was the preset/scripts folder.

var SCRIPTS_FOLDER = decodeURI(app.path + ‘/’ + localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts "));

Write out the modified to another xml file.

Modify ActionFileFromXML.jsx to run and process this new xml file and produce the new atn file.

Call this from your script

eval(‘//@include "’+newPath+’/actionFileFromXML.jsx";\r’);

newPath is the location of the running scripts folder.

var newPath = decodeURI(WhoAmI().parent);

function WhoAmI() {

var where;

try {var F = FO;

}catch( err ) {where = File(err.fileName);}

return where;

}

Remove any atn file from Photoshop if it is the action set you want to replace, load the new action set.
PR
Paul_R
Feb 1, 2009
I have sent you an e-mail with the modified code Gary.

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections