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

How to make a script for saving out multiple files with layer comps to JPEGs

New Here ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

Hello!

I am looking to see if anyone has had any luck creating a script for the automated saving of multiple Photoshop files with Layer Comps to JPEGs. 

I work on multi-frame banner files in Photoshop, and my client likes to see JPEGs of each frame for approval instead of a PDF. The time it takes to File-Export-Layer Comps to Files for 70+ Photoshop files is a little much. A script would be so much more efficient.

TOPICS
Actions and scripting

Views

1.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

correct answers 1 Correct answer

Community Expert , May 13, 2021 May 13, 2021

 

EDIT: I'd suggest that you look into editing the script provided in this topic:

 

Droplet using a .jsx action not working properly - every file has the same name!

 

I made the edits, recorded an action to use browse to the new modified script, then ran the action through automate/batch.

 

A perfect result, no button pressing and all comps from all files saved as expected with unique filenames!

 

Votes

Translate

Translate
Adobe
Community Expert ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

I guess if you find someone that has you would also want them to give their script to you.  More likely then not that script would not work with your Photoshop document because you documents design  will  not be like they designed their documents.  The Script will only be able to process document that have the designed elements the scripts is coded to process.  You will need to program the script you want for your multi-frame banner files design. All your multi-frame banner files need to have same design elements or structure. As fas as I know there no standard for a multi-frame banner file format.

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
Community Expert ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

 

I modifed the original script to use the active filename for each export, this is useful as part of an overall script or action to help semi-automate or automate saving multiple files from multiple comps with unique names which don't overwrite each other:

 

Export Layer Comps incorrectly referencing previous files for naming.

 

It is not THE answer, it is part of AN answer! :]

 

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 ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

I successfully did using batch on 2 files. And an action with insert menu item. You may have to hit enter 70x.

MikeGondek_0-1620875881471.png

 

 

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 ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

@Mike_Gondek 

 

That is similar to what I tested. I had to hit the OK button once per run of the modified script (twice if you count the alert finish message, which should be easy enough to disable in the comps script).

 

If the script can be called from within another script, that would be more workable.

 

Does anybody know if it is possible to call the Layer Comps to Files script from another script, bypassing the GUI? It can be done for the Load Layers into Stack, I'm just not sure on how to change the syntax...

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 ,
May 13, 2021 May 13, 2021

Copy link to clipboard

Copied

I've tried both options;

1. just creating an action from the javascript above, then creating a droplet

2. creating a batch with the action

 

Both times I tried, my layer comps for the multiple photoshop files would just save over one another with the same file name as the last. So 5 photoshop files with 3 layer comps each (should end up with 15 JPEGs) spat out and only gave me 3 layer comps.

 

It sounds like I need to figure out a way to take the file name of the file that is saving layer comps to files and use it for the prefix, and make sure for each new file that is opened and is saving layer comps to files it changes. 

 

I'm VERY new to this whole thing so what I am writing might be no sense at all... please bear with me!

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 ,
May 13, 2021 May 13, 2021

Copy link to clipboard

Copied

I don't believe that you can have two versions of the same script installed, so when I recorded the modified script referenced in the other topic, I recorded an absolute path to the script rather than using the original installed script:

 

recorded-jsx.png

 

This was recorded into the action via the File/Scripts/Browse command:

 

Downloading and Installing Adobe Scripts

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 ,
May 13, 2021 May 13, 2021

Copy link to clipboard

Copied

 

EDIT: I'd suggest that you look into editing the script provided in this topic:

 

Droplet using a .jsx action not working properly - every file has the same name!

 

I made the edits, recorded an action to use browse to the new modified script, then ran the action through automate/batch.

 

A perfect result, no button pressing and all comps from all files saved as expected with unique filenames!

 

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 ,
May 14, 2021 May 14, 2021

Copy link to clipboard

Copied

LATEST

Thanks everyone! The script worked. I am very very happy.

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