MAJOR BUG in Photoshop CS3 Actions
So I recently hopped on the CS3 wagon, installing the complete suite of tools on a fresh install of Windows XP. Unfortunately, I've had problems right out of the gate that have caused a major workflow issue.
Ever since the introduction of the Photoshop actions panel, I've used actions for a variety of purposes when preparing assets for Flash consumption. Many of these actions are based on the process of turning off all layers except the current one, doing a copy merged, making a new document, and pasting into it. This allows me to isolate Photoshop layers with filters and other effects and turn them into transparent PNGs for Flash, among other things, such as sizing and whatnot.
The default behavior of Photoshop when you copy something to the clipboard is that when you make a new document, it uses the the dimensions of the clipboard as the size of the new document. This is a brilliant idea that has been around since as long as I can recall, even before Photoshop actions.
In every version of Photoshop prior to CS3, if you are recording an action that copies to the clipboard and then makes a new document, whenever you run the action, it is smart enough to use Photoshop's default behavior and check the clipboard for the proper dimensions to make the new document. Unfortunately, somebody decided that needed to change and they have broken an entire folder of actions that I have spent years creating.
In Photoshop CS3, when you are recording an action and you copy to the clipboard and make a new document, it records those exact dimensions into the action, not the dynamic sized based on the clipboard. This is the polar opposite of how automation is supposed to work. You cannot edit the action step to use the clipboard, either.
Additionally, if you turn on the option to open a dialog at that step, the drop-down that lets you select "Clipboard" as the source for the dimensions is grayed-out. Yes, they disable Photoshop's default behavior when running actions.
Please! Somebody tell me who do I talk to to get this bug resolved? I have had to uninstall Photoshop CS3 and go back to CS2 so I can actually get work done without getting carpal tunnel syndrome doing the same keyboard shortcuts over and over because Photoshop CS3 actions are ignoring default Photoshop behavior that has been around since the dawn of Photoshop and, in fact, is still there, just not when running actions.
UPDATE: Here is the temporary fix script I mention in the comments: copymerged.zip
September 12th, 2007 at 12:06 pm
I read this description a few times after it appeared on Flashcoders. It appears you're asking something like "Does Photoshop CS3 change anything with clipboard sizing during Actions?" But I wasn't sure enough that that was the core question within the description to rationalize searching on it.
jd
September 12th, 2007 at 4:06 pm
Here are the steps to reproduce in both Photoshop CS2 (and earlier) and Photoshop CS3. Same steps, different results.
Part 1: Record the Action
1. Open an image (800×600 or so).
2. Make a new action call it Clipboard Test.
3. Select an arbitrary portion of the image.
4. Start recording.
5. Copy Merged (CTRL+SHIFT+C)
6. Make New Document (CTRL+N)
7. Paste (CTRL+V)
8. Stop recording
Part 2: Run the Action
1. Select a different sized area of the image.
2. Run the Action
In Photoshop CS2 and below, it will create a new file to the exact dimensions of your selection (based on the clipboard) and paste your selection into it.
In Photoshop CS3, it will create a new file to the exact size of the selection that was made during the recording of the original action and paste your different sized selection into the wrong sized document.
3. Click the Dialog Enable button on the "Make" step of the Action.
4. Run the action again from step 1.
5. Try to change the drop-down at the top – notice that "Clipboard" is disabled.
6. Instead of running the action, do it manually and see that Photoshop CS3 does indeed use the clipboard for the Make New Document and that Clipboard is available (and selected) in the drop-down on the New File Dialog.
Hopefully this will help you see the issue.
September 20th, 2007 at 4:36 pm
I just encountered this behavior while trying to automate a task and found your posts. I was trying to:
1. Select a layer based on its transparency
2. Copy it
3. Create a new document based on the size of the image on the clipboard
This is definitely a BAD THING in CS3! I hope they fix it soon (like yesterday). If any workarounds pop-up, please post them.
September 21st, 2007 at 12:07 am
I got a response directly from Adobe along with a script that can be edited for your needs.
I updated this original post to include the script he sent me.
——————————-
Hi Steve,
Did someone help you yet?? Anyway, my name is Allen, from Photoshop QE Automation team. Seems like we messed up your workflow there! Sorry about that! I tested this myself and have filed a bug against the developer.
In the mean time, I have a workaround for you
Attached is a Photoshop script that will do what the action has failed.
Since you can record a script run (easier to re-execute on your end), this should fit right in with your workflow. To use this,
1. place copymerged.jsx somewhere on your hard drive, preferably a fixed
location: ie. c:\scripts or anywhere you want actually, as long as it's not a network drive or USB drive. b/c if you unmount/disconnect them, your action will stop working
2. Get your image to the place prior to your copy merge to clipboard 3. Start recording the action!
4. From the menu: File -> Scripts -> Browse (dialog opens) choose the script that you just placed from your saved location. Click Load 5. See the script do a merge copy on your selection, create a new doc based on your selection size, and paste the item into the new doc.
6. Stop the recorder. Action now knows where your script is. You can now run the script from the action.
Of course, you can drag and drop the script or go through the menu in item 4 .. but that's pain. Having it in the action allows you to quickly run the script
Hope that helps!
Oh yeah, if you know how to script, feel free to open the jsx file (it's a text file) and make edits to it. Think of it as controllable Actions. If you want to get into it, there's documentations on how to use scripting in
your Photoshop installed dir\Scripting Guide\*.pdf There's also Adobe
ExtendScript Toolkit 2 (installed with Photoshop, check your XP Start menu) to help scripting if you really want to get into scripting.
-Allen
October 17th, 2007 at 4:29 am
Ok, Could you please make this script available to us? Link to it or just paste the code?
October 17th, 2007 at 1:44 pm
It's at the end of my post…
October 18th, 2007 at 4:45 am
Ah, missed "I updated this original post to include the script he sent me."
I solved all this by copying the Action Set file from CS2. It worked fine in CS3 too.
October 29th, 2007 at 7:37 am
Hey, thanks for posting the solution to this issue. I just upgraded to CS3 and found my "Extract & Export" action not working – very similar action to yours, but it does a Save for Web after pasting into the new document. I use it to do manual slicing. I was freaking out when it didn't work … what would I do without my lovely F2 key?
January 2nd, 2008 at 1:42 pm
Thank you so much for the info, Steven and Allen. This was driving me nuts, and I'm so happy I found this blog. The script works very well (though I'm still pissed at Adobe for screwing with such a fundamental element!
January 30th, 2008 at 12:07 pm
I can confirm this bug exists in CS (yes, the original) as well. Unfortunately, this script throws an error, probably because it's using something in CS3.
March 14th, 2008 at 8:01 pm
[...] MAJOR BUG in Photoshop CS3 Actions | flash developer | steven sacks I have had to uninstall Photoshop CS3 and go back to CS2 so I can actually get work done without getting carpal tunnel syndrome doing the same keyboard … [...]
April 9th, 2008 at 3:16 pm
This was just what I was looking for – although I was working on a file that didn't have any layers, therefore Copy Merged was unavailable. The solution to that is to remove the passed value of true on the copy merged command. So line 13 in the jsx file should be:
// copy merged
app.activeDocument.selection.copy();
April 15th, 2008 at 7:07 am
I found this MAJOR bug in CS3 after uninstalling CS2. Fortunately I kept the script containing the "making new from clipboard" feature. So I didn't have to reinstall CS2.
I put the action here, for those who would need it:
http://depositfiles.com/files/4762725
(it alco contains an image on how to load in in photoshop)
April 18th, 2008 at 1:45 pm
Alas this doesn't solve the bug completely – I've always used actions to export transparent PNGs, this work around creates a document at the size of your selected area, not the object within (as previous versions).
I use to make a selection around the object with a transparent background and run and action, which copy merged and created a new document the size of what was being copied NOT the size of the selection. This way I could quickly make a selection and know it would automatically "wrap" around the image I was trying to export to a new document.
I've even loaded old actions created in CS2 and they do the same thing.
Editing the copymerged.jsx it uses:
app.activeDocument.selection.bounds[2]
Anyone know how to get the actual image within and not "selection"?
April 24th, 2008 at 10:39 am
Yay! Solved the copy transparent object issue by adding some more code to the script file…
Amend line 17 of the script above (starting var myNewDoc), replace with:
var myNewDoc = app.documents.add(calcWidth, calcHeight, docResolution, "New Image", NewDocumentMode.RGB, DocumentFill.TRANSPARENT);
Then at the end of the script under the paste(); command, add:
app.activeDocument.trim(TrimType.TRANSPARENT);
This removes any empty transparent areas around your copied image.
Magic.
April 24th, 2008 at 11:04 am
[...] Solution: Finally managed to resolve the issue with some help from Steven Sacks… [...]
May 30th, 2008 at 12:06 pm
I'm not sure if this solution was already posted somewhere, but I have used the following as a solution to the create new from clipboard action problem in CS3.
Record:
1. File->New
2. Custom Dimensions: 1 x 1 pixel
3. Paste
4. Image->Reveal All
STOP
June 19th, 2008 at 2:58 pm
Thanks to Brian for the solution around the lack of Copy Merged! I thought I could simply open the script and find a similarly named command. I was so wrong. I need to learn JavaScript.
November 8th, 2008 at 7:00 am
I used KHB's workaround; works great too. Thanks!
January 18th, 2009 at 6:57 pm
Thanks, KHB – that's a great workaround! I'm using it to subpixel-antialias images, which calls for lots of automated pasting into new windows.
January 26th, 2009 at 7:48 pm
KHB, thanks a lot! This issue was driving me crazy!
May 5th, 2009 at 2:39 pm
KHB: Clever man.
Adobe: Shame on you.
June 9th, 2009 at 6:17 pm
Thank goodness for this information! These solutions are still valuable.
October 1st, 2009 at 1:44 pm
Perfect!!! This is what I was looking for.. thank you very much! yupiii
March 10th, 2010 at 9:38 pm
Thanks to KHB – i wasnt having a problem with Actions in CS3 but the Clipboard is always greyed out – tried your work around and its perfect!
Thanks alot
April 14th, 2010 at 9:08 pm
Thank You. Thank Google for putting you at the top. Why the heck doesn't Adobe ever update their software? Oh…I guess they do – Reader.
April 16th, 2010 at 2:13 pm
My workplace Photoshop CS has the same problem with clipboard image size during action, but my home CS2 work perfect. But in CS preset field is not grayed opposite to yours CS3 if action is stopped on "New" dialog.
This is bug, because in action step is recorded: "Preset: clipboard", thats mean dynamic new document sizes, depending on copied image.
"Reveal All" – is elegant and easy solution, thanks to KHB