3 Replies Latest reply on May 10, 2014 6:52 AM by JJMack

    Layer Comps to Files as Part of Action

    justin.traylor

      Hello,

       

      I use Layer Comps to create many different color combinations in my PSD files, and then use Layer Comps to Files to export them as individual PNG. This works just as I want, but I would like to run this as a batch on multiple files. When I use the script as part of an action, I get the message "Reference Error: dlgMain is undefined". This works perfectly fine with no error when exporting to JPG, but I need PNG to work so is there a way to alter the script to fix this?

       

      Thanks,

       

      Justin

        • 1. Re: Layer Comps to Files as Part of Action
          JJMack Most Valuable Participant

          I do not think that script is written as plugin and thefore its dialog setting would  not be recorded into an action step to bypass the dialog when the action is played.   dlgMain is most likely a variable name user for the scripts dialog and for some reason it was not set.

          • 2. Re: Layer Comps to Files as Part of Action
            justin.traylor Level 1

            That doesn't answer my question, I'm not an experienced script writer. How do I fix this?

            • 3. Re: Layer Comps to Files as Part of Action
              JJMack Most Valuable Participant

              If I was right and you tried recording using the script in an action. If that step does not contain recorded dialog setting you can see in the action step when you expand the action step.  The script is not coded as a Plugin the script does not have action support coded in.  To fix it you would need to add plug-in code required for action support.

               

              Script that are Plug-in are usually listed in menu File>Automate>Name these can be recorded in actions they have code in them to record the setting used in their Dialog into the action step your  recording. When the recorded action is played the scripts dialog will only be displayed and interactive if you turn on the steps dialog in the action.   The Dialog setting are always retrieved from the Action step being played and set into place.  If you did not turn on the action step dialog the dialog will not be displayed.  If you turned on the dialog in the step the dialog will be displayed with the recorded setting in place.  The step interactive requiring user intervention.

               

              Some of Adobe Plug-ins are implemented with Photoshop scripting in JavaScript.  Contact Sheet II. Conditional Mode Change, Fit Image, Lens Correction, Merge to HDR Pro, Photomerge.   You can also add your own.  Scripts came be executed from any folder however to be listed in Photoshop menus they need to be in Photoshop  Install Tree or Linked into If and contain some special indemnification code.

               

              Capture.jpg