Action executes perfectly within file, fails when Batching

New Here ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

Using Photoshop 22.4.2 on BigSur 11.4

 

I've created an Action that I'm using to open a folder of PSD files, crop them square, and save as a JPEG.

 

The Action runs perfectly as expected when running it on an open file in Photoshop.

Before:

MPeckover_0-1623788525662.png

After:

MPeckover_1-1623788556688.png

Note that the all the commands completed and a JPEG was saved into the folder on the left.

Closeup of the Action:

MPeckover_2-1623788600300.png

I have ~100 PSD files to apply this to, plus other actions/batches I would like to execute in the future, but when I close the open file and use File>Automate>Batch to run the action on a folder of PSDs, the batch fails with a "The command "Select" is not currently available" which is the first command in the Action. This repeats for every command.

 

Batch window:

Screen Shot 2021-06-15 at 4.38.19 PM.png

 

Error popup:

MPeckover_4-1623788787818.png

 

Things I've tried:

  • Running the Action without the beginning "Select" (assuming maybe the file opens with the layer already selected, and is unable to select it again) returns the same error with "The command "Duplicate" is not currently available". The file that I tested the Action on is also the first file in the folder, so it is the one causing the hiccup in the batch.
  • Also tried running the Batch using local folders rather than on a network drive, same result
  • Tried with another PSD at the beginning of the folder, same result
  • Batching using other Actions (that also work within files) also doesn't work
  • Restarted Photoshop
  • Restarted Mac

 

Not sure what I'm doing wrong? I use Actions regularly but haven't tried to Batch in about a year. Has any one else experienced problems like this? Thanks!

TOPICS
Actions and scripting, Problem or error

Views

2.4K

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

correct answers 1 Correct Answer

Adobe Community Professional , Jun 16, 2021 Jun 16, 2021
I didn't follow this thread, just looked at your original post and I think you should record to your action 'open' item (of any file from any location), that should happen before 'Selecting Layer' item. I mean if there's in batch 'Override Action "Open" Commands' then your action should start from it? Without any document opened by action and controlled via batch you're getting error dialog.

Likes

Translate

Translate
New Here ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

Edit: I understand that generally this occurs when a Command's expected prerequisite isn't met, but seeing as it is the first Command within an Action (plus it works perfectly within an open file) I'm struggling to find the source of the problem.

 

Thanks again for any help!

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 ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

The first step is explicitly selecting "Layer 1". Do all the files have this exact layer name?

 

Are all files only single layered?

 

You can run bulk processing using an action with various scripts such as the Image Processor script that ships with Photoshop, or other scripts such as Image Processor Pro, Picture Processor etc. These scripts perform the open and save steps so remove or disable the save step in your action if you use these scripts.

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 ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

Yes, the all have only one layer called "Layer 1". Even if that weren't the case, the Action still runs fine within the file, so the Batch process not being able to find that layer can't be the problem, can it?

 

@tomzag same applies

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 ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

Can you post a cropped screenshot of the action panel with all steps expanded?

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 ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

Screen Shot 2021-06-15 at 5.31.31 PM.png
Here you go! Although as I mentioned, the Action has no problem running within the file, the issue only comes up when trying to use Automate > Batch. 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 ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

That is without the Select command at the start, forgot to re-add it while troubleshooting.

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 ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

Just curious if there is only one layer and they are all named the same, you shouldn't need to select the layer by name.

 

So what happens to your batch when as you say for troubleshooting the select layer 1 step is removed?

 

You could also try inserting the select all layers command if you feel the need to explicitly select the only layer in the file.

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

Yes as I mentioned in the post, I have tried that. The Batch just fails at the first step again with "The command 'Duplicate' is not currently available.

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

OK, have you tried the select all layers command? Have you looked at my previous suggestion for Image Processor, Image Processor ProPicture Processor etc?

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

Tried select all, same problem. There isn't anything wrong with the way the action is written: it runs fine on an open file from the Actions panel. The problem only comes up using the Batch window, regardless of what the command is. No commands run from the action window no matter what I do.

I'm not familiar with these, and I'd prefer to keep things native if possible. I'd rather not sink work time into figuring out more software, I'd prefer if Photoshop just worked as designed... I'll keep that as a last resort, thanks for the suggestion 🙂

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
Engaged ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

Your action wants to select a layer with the name "Layer 1".

If there is no "Layer 1" you receive the error mentioned (in your screenshot there is only a layer with the name "Background"). I think this is the problem.

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 ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

Show not a screenshot of the error window, but the entire screen  (at the time of the error) , where we can see the action panel and the open file.
 

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

Error only comes up when the file is closed with the Batch window open. That window appears as pictured above, along with the error message.

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

I don't use the Batch command ... never, it's easier to write a script.

I'm wondering what you mean by the Batch window?

As far as I know, there shouldn't be any windows at runtime.

You say the file is closed. This is strange.

Naturally, there will be an error, since the Action has nothing to work with.

 

You have something strange going on.

It would be better if you recorded a video or posted your Action here + a screenshot of the Batch settings.

Then one could try to reproduce your situation

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

I've never gotten into writing scripts, I find the UI fine ans easy to work with.

 

The batch window is in a screenshot in my post. Found under File>Automate>Batch. This can be accessed without a file open, just the application. All of the sreenshots are in my post? I'm not sure what else you need.

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

I do not understand at all what you are talking about, there may be problems with the translation. Are you saying that when you call the File-> Automate->Batch window you get an error window? But to start the process, you must click the OK button. After that, the window should close and only after that the process can be started and Actions can be called. I don’t understand what’s going on. Some kind of devilry.
 

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

Loll, already long thread with probably quick and obvious solution 🙂

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

If you understand what is happening and what the problem is, please explain it to us.

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

No, I don't. I'm assuming the cause of the trouble might be something unsaid yet and banal.

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

There's literally a screenshot of the Batch window, so that answers your question. Obviously I am clicking "OK" in the Batch window after setting up the batch. How could this possibly be misunderstood?

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

>>>Error only comes up when the file is closed with the Batch window open.

 

Describe what was said in other words, I do not understand. Unless, of course, you want to figure out the problem yourself. What is the problem with capturing the video from the screen during your actions?

 

 

 

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

Error does not come up when running the Action within an open file (as seen in screenshot). Error only occurs (as seen in screenshot) when attempting to run the Action in the Batch window (as seen in screenshot) using File>Automate>Batch. I am clicking OK to run the batch and the error occurs.

I won't screen record because I don't want to disclose personal information, don't have the time to find recording software, compress it, host it somewhere and share, and because all it would be is my cursor moving between screens that I have already shown in screenshots. Instead of a video, imagine these two screenshots connected by me clicking OK. I'm not sure how I can possibly give you more detail.

Screen Shot 2021-06-16 at 12.33.08 PM.pngScreen Shot 2021-06-16 at 12.34.10 PM.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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

Try turning off the Home Screen. Should be in settings like "Auto show the home screen"

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 ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

No change. Should I expect a UI change to effect my Batch errors?

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