MAJOR BUG in Photoshop CS3 Actions

September 12th, 2007 by Steven Sacks

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

Posted in General, Workflow

18 Responses

  1. John Dowdell

    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

  2. Steven Sacks

    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.

  3. John R. Nyquist

    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.

  4. Steven Sacks

    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 :P

    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

  5. GoranG

    Ok, Could you please make this script available to us? Link to it or just paste the code?

  6. Steven Sacks

    It's at the end of my post… ;)

  7. GoranG

    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.

  8. Richard

    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?

  9. Benjamin

    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!

  10. Chris

    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.

  11. tutorialboss.com » Blog Archive » MAJOR BUG in Photoshop CS3 Actions | flash developer | steven sacks

    [...] 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 … [...]

  12. Brian

    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();

  13. rorogio

    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)

  14. Peter Lewis

    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"?

  15. Peter Lewis

    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.

  16. Peter Lewis » Blog Archive » Photoshop CS3 bug with actions

    [...] Solution: Finally managed to resolve the issue with some help from Steven Sacks… [...]

  17. KHB

    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

  18. Patrick Sandberg

    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.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

About Steven Sacks

I am a professional Flash developer with over 13 years of programming experience. I have consulted for high-profile agencies and companies in San Francisco, Los Angeles, Atlanta and New York, and developed numerous award-winning websites and rich internet applications for clients including Adobe, Fox Sports, FX Networks, Anheuser-Busch, GE, DirecTV, ESPN, The Weather Channel, Home Depot, and Coca-Cola.

I am the author of the open-source Gaia Framework for Adobe Flash, which dramatically reduces development time and makes developing Flash sites much easier.