• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

Any way to edit actions in a text/script editor?

Explorer ,
Aug 09, 2010 Aug 09, 2010

Copy link to clipboard

Copied

I need to duplicate a very long action about 5 times and make file-name saving changes to each step, but going through the resaving process 75 times is a pain in the ass.  It's a simple action that shows, saves, and hides 75 different layers individually.  But the naming of these saved files will be different depeing on the photoshop file I'm using (about 5 different variances).  Batch Processing just takes too long to do what my action will do in 10 seconds, so it seems like I'm stuck with using actions.  My question is:

Is there a way to edit actions through a text/script editor vs using Photoshop?  I could copy/paste/replace text much quicker than going through the actual saving process 375 times.

TOPICS
Actions and scripting

Views

90.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Beginner ,
Aug 09, 2010 Aug 09, 2010

Copy link to clipboard

Copied

Ctrl + Alt (Cmd + Opt on Mac) while click on Save Actions from the Actions panel flyout will give you a txt file. The problem is that I do not know about a way to re-convert this into an atn.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 09, 2010 Aug 09, 2010

Copy link to clipboard

Copied

I tried the command+opt solution first, which spit out a text file containing every every action (rather than the set I had selected) and that was fine.  I made the changes, but when I tried loading that text file back into Photoshop's Actions pallet, it was unrecognizable as an action.  Just to confirm that it wasn't any faulty scripting, I saved out another copy of my actions and immediately tried to reload them back with that text file (I made no modifications) and again, the text file was unrecognizable.  How do I load the text version back into the Actions Pallet?  I've tried the Load command from the Pallet and also tried dragging the file directly into Photoshop.  No dice.

Xbytor, I visited your 2 links, but don't understand how I implement my action file into that system.  Is it something I download?  When I visited the links, they were just browser pages filled with what looks like script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 09, 2010 Aug 09, 2010

Copy link to clipboard

Copied

I did some searching and came across this:

(Photoshop only) Press Ctrl+Alt (Windows) or Command+Option (Mac OS) when you choose the Save Actions command to save the actions in a text file. You can use this file to review or print the contents of an action. However, you can’t reload the text file back into Photoshop.

So, it seems this doesn't provide a way to edit actions.  You would think they're be a way to edit actions in a text editor though...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 10, 2010 Aug 10, 2010

Copy link to clipboard

Copied

bsnyder175 wrote:

Xbytor, I visited your 2 links, but don't understand how I implement my action file into that system.  Is it something I download?  When I visited the links, they were just browser pages filled with what looks like script.

Try a right click on the links to Xbytor and choose save link as and save his two scripts into your \Photoshop version\Presets\Scripts. The next time you start Photoshop you will have two nes scripts in meny File>Scripts... . You can edit a XML file with a text editor like wordpad.

Also the Action Palette is a full fledge Action editor.  It should be quite easy to edit you action highlight the sections you want to dupe five times and replicate that section five times then rerecord(edit) the duped "saved as" steps. You may want to look at my crafting action package.

http://www.mouseprints.net/old/dpr/JJMacksCraftingActions.zip

Contains:

Action Actions Palette Tips.txt

Action Creation Guidelines.txt

Action Dealing with Image Size.txt

Action Enhanced via Scripted Photoshop Functions.txt

CraftedActions.atn Sample Action set includes an example Watermarking action

Sample Actions.txt Photoshop CraftedActions set saved as a text file. This file has some additional comments I inserted describing how the actions work.

12 Scripts for actions

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 10, 2010 Aug 10, 2010

Copy link to clipboard

Copied

Also the Action Palette is a full fledge Action editor.  It should be quite easy to edit you action highlight the sections you want to dupe five times and replicate that section five times then rerecord(edit) the duped "saved as" steps. You may want to look at my crafting action package.

Yeah, this is what I've been doing.  Duplicating actions and just revisiting the save steps, but goodness, it still seems to take an eternity.  Thanks so much for the extra info on the scripts.  I'll also definitely check out your script package.  Anything I can do to make processees quicker is nothing but good news.  Thanks so much, everyone.  I'll report back soon.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 30, 2014 Jan 30, 2014

Copy link to clipboard

Copied

No, it doesn't work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 09, 2010 Aug 09, 2010

Copy link to clipboard

Copied

This will convert an action file to XML:

http://ps-scripts.cvs.sourceforge.net/viewvc/ps-scripts/xtools/apps/ActionFileToXML.jsx

You can edit this file with a normal text editor.

This will convert an XML file to an action file:

http://ps-scripts.cvs.sourceforge.net/viewvc/ps-scripts/xtools/apps/ActionFileFromXML.jsx

There are a few cases where this does not work. But they are not very common.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 21, 2013 Mar 21, 2013

Copy link to clipboard

Copied

This was an incredibly helpful toolset- thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 14, 2013 Oct 14, 2013

Copy link to clipboard

Copied

xbytor2 wrote:

This will convert an action file to XML:

http://ps-scripts.cvs.sourceforge.net/viewvc/ps-scripts/xtools/apps/Ac tionFileToXML.jsx

You can edit this file with a normal text editor.

This will convert an XML file to an action file:

http://ps-scripts.cvs.sourceforge.net/viewvc/ps-scripts/xtools/apps/Ac tionFileFromXML.jsx

There are a few cases where this does not work. But they are not very common.

This looks good but are these version sensitive? This post is about 3 years old and the current version is Photoshop CC.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 14, 2013 Oct 14, 2013

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 14, 2013 Oct 14, 2013

Copy link to clipboard

Copied

I was able to get this running on CS5 and CS5.5.  Give it a try the worst you can get is an error.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jan 07, 2014 Jan 07, 2014

Copy link to clipboard

Copied

Looks like my last post was eaten. The scripts should work from CS3 through CC.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 07, 2014 Jan 07, 2014

Copy link to clipboard

Copied

i am using CC and the script From Action to XML works but when i run the Action From XML script i get the mac spinning wheel of death.

any help would be great!!

I tested it on a smaller Action and it works fine on CC.. Maybe my ActionScript is just too big or something.

It also has commands to save out differnet files as is goes through the action. Maybe thats it.

Would be really cool if this worked for me though.. save hours if not days in recording action scripts if i could just duplicate a set of commands and rename custom file names in the XML file..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jan 07, 2014 Jan 07, 2014

Copy link to clipboard

Copied

Email the original xml and modified xml and I'll  see what I can figure out.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 24, 2014 Oct 24, 2014

Copy link to clipboard

Copied

It turns out that very large actions or actions that contain embedded color profiles will take a long time to run. By "a long time" I mean 45 minutes to 1.5 hours. JavaScript does not deal with raw binary data very well so the internal conversions take quite a bit of time.

New revs of the scripts listed above have been updated in the past month or so perform somewhat better than previous revs.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 14, 2017 Apr 14, 2017

Copy link to clipboard

Copied

PLEASE HELP

Sorry to resurrect this post but I am having problems with updating my action with the two scrips you provided. The scripts seem to work but every time I go back into the action and expand the export steps, it says "file or folder not found". I've tried writing the paths all different ways and nothing works. I've even tried putting the path to my desktop but that didn't work either. I am on a Mac and I know file paths are different.

I can't edit the action the normal way, by going through it and updating the file paths when I go through the export step, because the folders (2) I have to save to are too large and lock up my machine when I try to save to them. So I HAVE to be able to manually edit the file paths in order to get this action to work. I can't use image processor or a batch process because this action saves to two folders and you can't choose two folders with the those methods. If ANYONE can help I would be GREATLY appreciative! I'm in desperate need of a solution!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 14, 2017 Apr 14, 2017

Copy link to clipboard

Copied

The action you create for the Image Processor or Image Processor pro which is much better download plug-in should not contain any saves.  That is the function the Image processor does for you.  Scripts have much better file saving abilities than actions.  The Image Processors can also optionally resize your image.  With Image Processor Pro you can save as many image files and file types you need for your images and you can include an action to be used when creating output image files you can use one or many different actions for each output file being saved.  Keep your actions simple have the Image processors do the resizing and saving for you.

Simple actions actions that doe not save are easily recorded.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 14, 2017 Apr 14, 2017

Copy link to clipboard

Copied

JJMack,

Thank you for your reply! I feel that my action are pretty simple. I did a lot of experimenting but that doesn't mean there isn't a better method. Here is my action:

1. Convert Mode - to RGB mode

2. Fit Image (because we have vertical and horizontal images and don't want to run two actions each time. There are several times where we need to process thousands of images at a time)

3. Canvas size - I make the images square because of the space they fit into on our website.

4. Export - This is the first export and I save to a folder called "large"

5. Export - Second export where I reduce the size and save to a folder called "thumbnail". This uses the legacy Save for Web.

6. Close - Without saving

The issue isn't really the action itself though. It's the fact that the export locations are so large that finder locks up every time I try to edit the action. And like I said above, the conversion scripts aren't working right either. The only other thing I can think to do is to temporarily rename the folders and then create two new "large" and "thumbnail" folders that are empty. Then I can update my action.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 14, 2017 Apr 14, 2017

Copy link to clipboard

Copied

For the sake of time, we ended up renaming the folders and creating temporary ones that were empty. Then I was able to update my action. So, unless there is better way to do what I want to do in the action above, I will stick with what I got for now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 14, 2017 Apr 14, 2017

Copy link to clipboard

Copied

You are over thinking the process.  If you want to make different aspect ratio images  you either have to add canvas and have borders or crop the image to the aspect ratio you want.  The Image processor can the fit the image to any size you want.

In my crafting action package I include more that a dozen scripts that you can use in action.  One of the two plug-in script I provide is named Aspect Ratio Selection. That Photoshop Plugin can make selection or path that are  either rectangles or ellipses. It also has other options.  You can record using it in an action and the aspect ratio the you use when you record the action will be recorded into the Action step.  When the action is played there will be no dialog displayed the recorded setting will be used.  The Aspect Ratio Selection or path set will be set relative to the document orientation.   So if you want the sides to have a 3 to 2 aspect ratio  if the image is a portrait the setting will be 2:3 if the image is a landscape the setting will be 3:2  If the document is square the setting will be landscape 3:2.

With the Image Processon Pro you can include an action to be use for each output image set you want to create. The Action can be run before or after the Image processor Pro optional image resize. Which is a Fit image type resize. The image Aspect ratio will be preserved. So all you need to do is set the width and height to the maximum size side you want to have.   I create 10 different jppeg sets for my display devices in a single run.

All I need the action to crop the images to the aspect ratio I wanted.  Of course it best for  hand help web devices for you can rotate them in you hand and the viewer will resize the image being displayed the fit the current orientation of the display.

The actions contain only three steps.   Though the Imace Processor can resize I chose to do the resize in the actions. All I needed to do in the Image Processor Prodilod was set the ouput location and the actions to use

Step 1 Aspect Ratio Selection  A B

Step 2 Image Crop.

Step 3 Fit Image Max Width Max Height  the display divices  longest side set for both.

Menu File>Automate>Image Processor Pro settings these cane be saved and loaded.

Capture.jpg

Aspect Ratio Selection dialog. Photoshop menu File>Automate>Aspect Ratio Selection...

Capture.jpg

Crafting Actions Package UPDATED Aug 10, 2014 Added Conditional Action steps to Action Palette Tips.
Contains

Example
Download

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 11, 2018 Apr 11, 2018

Copy link to clipboard

Copied

Why two links to the same code?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 26, 2019 Jan 26, 2019

Copy link to clipboard

Copied

It may be a bit on a tangent, and I noticed very late that the thread is very old, but nevertheless would there be any way to get the Action out of a Droplet (I am looking at the Mac variant)?

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 26, 2019 Jan 26, 2019

Copy link to clipboard

Copied

Can you open the droplet with TextEdit?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 26, 2019 Jan 26, 2019

Copy link to clipboard

Copied

On Mac (as mentioned), a Droplet is an .app Bundle, containing a specific structure of subfolders and files. Therefore, it won't open in a text editor.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines