Batch Action set - can not suppress dialog

New Here ,
Jul 31, 2022 Jul 31, 2022

Copy link to clipboard

Copied

While performing a batch edit which includes calling on an Action Set I notticed several errors popping up on the screen (I am opening a bunch of DDS files, removing the Alpha channel, saving, then closing). The issue is that some of these DDS files that are being processed in the batch edit do not actually contain Alpha channels, so a dialog box appears stating the error (expected behavior I know), however when processing hundreds of files, I can not sit there and press the CONTINUE button for hours (this defeats the purpose of automation)..

So I played around with the export settings and saw that there is a 'STOP FOR ERRORS' option which if disabled, will suppress the error dialog boxes from appaering during the batch edit but THE FILES DO NOT SAVE WITH ANY CHANGES. 

So my question at this point is, does suppressing this error dialog box actually just make the batch skip the file? Is there a way to make this work without a dialog box if there are errors?

Any help is appreciated!
Thanks

TOPICS
Windows

Views

57

Likes

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 Professional ,
Jul 31, 2022 Jul 31, 2022

Copy link to clipboard

Copied

Have you tried with Conditional action, actually step which will determine which action to play > condition : Document Has Alpha Channels to run action with remove alpha channel step (Then Play Action) or Else Play Action without step to remove alpha channel.

conditional step.jpg

 

Likes

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 ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

Thanks for this. This seems exactly what I need, but I am not sure which part of the process would involve setting this up. My actions is as follows:

Delete Channel Alpha 1
Save
Close

I imagine that the only part of this action set that would need the condition would be the Delete Alpha 1 part, but I am not sure how to make this conditional. 

Any help is appreciated. 

Thanks!

Likes

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 ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

Im just not sure how to set this up. I found how to add 'Conditional Actions', but from the looks of this, it will be a snake eating its tail because the IF action just tells it to restart. 

BlueRose5_0-1659640294729.png
Would I need to set up a secondary action set that triggers the sequence? 

 

Likes

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 Professional ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

@BlueRose5 – On a separate note, you risk the loss of those Actions by putting them into the Default Actions set.

 

You should create a new Action Set, then drag any custom Actions from the Default Actions set into your new set, then use the Actions panel menu to save the Action Set/s to .atn file.

 

https://prepression.blogspot.com/2017/01/photoshop-custom-action-file-backup.html

 

Likes

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 Professional ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

LATEST

I generally lay out my simple 1 conditional actions as follows:

 

conditionals.png

 

Likes

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 Professional ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

Actions explicitly record the absolute alpha channel name, which can create multiple issues when automating.

 

Scripts don't have this limitation.

 

This code removes all channels (alpha or spot, but not layer mask alpha channels):

 

#target photoshop
try {
    activeDocument.channels.removeAll();
} catch (e) {}

 

And this one only removes alphas:

 

/*
https://community.adobe.com/t5/photoshop/remove-alpha-channel-during-a-batch/m-p/11285697
*/

#target photoshop

removeAllAlphaChannelsNotSpot();

function removeAllAlphaChannelsNotSpot() {
    try {
        var myChannel = app.activeDocument.channels;
        for (n = myChannel.length - 1; n >= 0; n--) {
            aC = myChannel[n];
            if (aC.kind == "ChannelType.MASKEDAREA" || aC.kind == "ChannelType.SELECTEDAREA") {
                aC.remove()
            }
        }
    } catch (e) {}
}

 

While this code only removes spot channels:

 

/*
https://community.adobe.com/t5/photoshop/remove-alpha-channel-during-a-batch/m-p/11285697
*/

#target photoshop

removeAllSpotChannelsNotAlpha();

function removeAllSpotChannelsNotAlpha() {
    try {
        var myChannel = app.activeDocument.channels;
        for (n = myChannel.length - 1; n >= 0; n--) {
            aC = myChannel[n];
            if (aC.kind == "ChannelType.SPOTCOLOR") {
                aC.remove();
            }
        }
    } catch (e) {}
}

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

Likes

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