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

How to 'Stop' Action to use Healing Brush in Image Processor?

Explorer ,
Aug 30, 2021 Aug 30, 2021

Copy link to clipboard

Copied

I am using Image Processor to batch process ~600 images.

 

I have set a dialog popup for Levels and also for Crop.

 

Then a conditional resize according to orientation, then a sharpen.

 

All working - so far so good.

 

* Here is my issue * I want to lastly pause, to use the Healing Brush to remove any marks and dust spots.

 

I can get the Action to 'stop' to allow me to do this in single image mode (clicking 'play' to continue after the healing is completed) BUT this does not work when used in the Image Processor batch process, ie: saving of this image does not complete and the batch processing of the remaining unprocessed images ceases completely.

 

Any ideas what I'm doing wrong?

 

 

It seems this may be a long-standing known issue... Photoshop action stop&go in Batch

TOPICS
Actions and scripting , Windows

Views

2.0K

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 2 Correct answers

Guide , Aug 31, 2021 Aug 31, 2021

I have a script that allows you to work both in normal batch mode and to continue operations after stopping (you can set a stop either in the script settings or in the action itself - as convenient). To continue operations after stopping, you need to call the script again (for quick continuation, you can either assign a hotkey to the script in the menu, or write it to an action).

2021-08-31_09-23-18.png

Advanced-batch

 

The code is terrible in places, I would like to rewrite many points, but I have no time to do it, h

...

Votes

Translate

Translate
People's Champ , Aug 31, 2021 Aug 31, 2021

Votes

Translate

Translate
Adobe
Community Expert ,
Aug 30, 2021 Aug 30, 2021

Copy link to clipboard

Copied

It sound like your Action stop,  stops the Action and also stops the Script for you could use the healing brush on the current document.  After you used the healing bush. You were able to continue the Action by clicking on the Action Palette Play button  for the action was stopped position to the step after your stop step.   There is no way that I know of that a terminate script execution can be resumed. Restarting it would start the whole batch process  over again it would not pick up on the current after your resume actions play execution ends.

 

The first thing you did wrong was to have a batch processor include an action that has interactive steps.  That kills the automated batch processing humans intervention is required to continue the automated process.  The second thing you did wrong was you stopped the action and batch processor so you could use the healing brush on the current document.  You terminate the Image processor script. You ended the Batch Process.

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
Explorer ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

quoteThe first thing you did wrong was to have a batch processor include an action that has interactive steps.  That kills the automated batch processing humans intervention is required to continue the automated process.

By @JJMack


Thanks, for your reply, but batch processing CAN include interactive steps. That's the point of having them. Pausing to adjust both Levels and Crop works just fine, then the batch continues without a problem.

 

quote

The second thing you did wrong was you stopped the action and batch processor so you could use the healing brush on the current document.  You terminate the Image processor script. You ended the Batch Process.


By @JJMack

 

I didn't manually stop the script, I added a stop to the action. As I said above, this works absolutely fine for some processes, but the batch will not resume after the Healing Brush.

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
Guide ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

These are two different concepts - dialog boxes (interactive steps) do not interrupt the playback of the action. Stop command - stops playback (and the script receives a message that the operation was interrupted by the user).

 

This is not a bug, this is a feature 🙂

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 ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

Here is what I thougtht was happening.

 

If you did not stop the script then you would not be able to use the healing brush on the current  document being processed by the image Processor script that plays your Action on each image Processed.  When your Action execution ends the Image processor continues it image processing may resize the document and save 1 or 2, or 3 new images files close the current document and then open the next file to play your action on. If you did not manually stop the Script the action the Images Processor was playing  return an error code to the the script when you stopped the Action. I would have thought the Image Processor would just log the error and continue processing the other images in the batch. It  may be just  Batch and Image Processor Pro  do that. It look like the Image Processor just terminated on you, for you could use Photoshop UI to use the healing brush on the image the Image Processor script was processing The Image Processor script  was no longer running  Photoshop's UI was available for you to use the healing brush.   When you use an Automated process in Photoshop that Action, that script is given control of Photoshop.  Photoshop's  UI is not available for you to use till the Automated Process End.   If you Could use Photoshop UI  to use the healing brush the Automated Process you started has ended.   You Started the Images Processor script any you set  an option in its dialog to include using your Acton.  

 

Anyway  that is what I thought was happening.  I was wrong.   However, I was more right then I was wrong. I have never used doaction in a Photoshop Script.  I look at the Image Processor scripts code and saw it used the doaction method to play your action.  There is no return code look at.  So I create an action that I inserted  a stop or continue Stop message.I batch this action with Image Processor script.   It turns out If I used the stop Option  doaction terminates the Image Processor Script and there is no error message.   So your Stop terminated the Image Processor script. If I use the continue option the stop step is an interactive step the action continues and doaction does not terminate the script.

 

Here the code

if ( this.params["runaction"] ) {
  doAction( this.params["action"], this.params["actionset"] );
  app.activeDocument.flatten();
  app.activeDocument.bitsPerChannel = BitsPerChannelType.EIGHT;
  RemoveAlphaChannels();
}
var uniqueFileName = CreateUniqueFileName( subFolderText, fileNameNoPath, ".jpg" );
if ( ! IsFolderWritable( subFolderText ) ) {
   alert( strCannotWriteToFolder + File( subFolderText ).fsName );
} 
else {
   SaveAsJPEG( uniqueFileName, this.params["q"], this.params["icc"] );
}

 

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
Guide ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

I have a script that allows you to work both in normal batch mode and to continue operations after stopping (you can set a stop either in the script settings or in the action itself - as convenient). To continue operations after stopping, you need to call the script again (for quick continuation, you can either assign a hotkey to the script in the menu, or write it to an action).

2021-08-31_09-23-18.png

Advanced-batch

 

The code is terrible in places, I would like to rewrite many points, but I have no time to do it, however, it has been working in my studio for more than 2 years without any problems and, in combination with actions, allows you to completely replace the standard batch and image processor.

 

Unfortunately, there is no help file. Most of the functions are intuitive, something can be understood in the process of working with it. The way to solve your problem with it in this video:

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
Explorer ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

Many thanks @jazz-y   I will give it a try 🙂

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
Participant ,
Oct 25, 2022 Oct 25, 2022

Copy link to clipboard

Copied

Hi there... I posted on your github in the issues section but as there was no posts there at all I thought I would replay directly to this post as well. Hoep that is ok.

 

Hi there... this is a fantastic idea for a script as I use actions all the time and have always wanted something like this.. but I can not seem to get it working.

 

I make 3 actions as a test

  • Open File, Rotate Image 90d
  • Resize image, Rotate image 90d
  • Save as PNG, Close the open image

 

I load up your script.... files/scripts/browse/AdvancedBatch.jsx

 

whatamidoingwrong.jpg

 

So I run the file... i have "open supressed" or it will open twice. I have the stops on action 1 and 2.... It loads the image... it stops... I can draw on the file.. then I run action 2, draw , run action 3 (this is what it looks like you are doing in the video)... but it dose not seem to work.. it now errors as it dose not load the next file in the directory.

 

Video Example

 

Also what does ""put stop inside action" mean? in those options mean"

 

Thanks again for your time and your awesome script. I am sure it is just my dumb human error making it not work!

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
Guide ,
Oct 25, 2022 Oct 25, 2022

Copy link to clipboard

Copied

Sorry, one day I will find time to write a reference to it 🙂

 

First, rely only on the settings that are in the script. It does not know how to execute the command "override action open commands". That is, if your action has a command to open a certain file, it will open it again and again. Remove or disable this command from the first action.

 

Secondly, in order to continue working and go to the next step after stopping, you just need to run the script again. No need to manually launch individual actions. To do this, it is more convenient to place it in the Presets\Scripts\ folder so that it appears in the File -> Automate menu and assign a hotkey to it (or record the script launch in an action and assign a hotkey there)

 

Thirdly, since I wrote it for my own tasks, the script has some limitations when saving files: by default, I added only three presets: jpg, tif, psd. To use more formats, you need to register saving in the action (exactly as it is done for you), but at the same time use the script option "override "save as" commands in last active action" (note that with this option the script will close the file itself, i.e. you need to disable the last "close" command)

 

Here is a video illustrating your task (i use F2 shortcut to move to next step after stop):

 

 

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 ,
Oct 03, 2023 Oct 03, 2023

Copy link to clipboard

Copied

LATEST

Has this script been updated for the use on newer versions of PS?

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
LEGEND ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

Do it partially, every 50 files without batch. Open first part of files, play action that is going to stop (using stop item without dialog and continuation), brush on canvas, continue the action by assigned key that is going to save & close a file. Do the same on remaining 49 files, then open another part of 50 and so on.

 

Tip: to save a file without overwriting, create new document, start recording and save it in output folder. Stop recording. Such saving item won't be bound to any file, just its format and the folder it had to be saved in.

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
People's Champ ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

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 ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

I wouldn't call it an "issue" as such, it was designed to work this way, just as the script from jazz-y is designed to work differently.

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
Explorer ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

I pause a batch to do some interactivity (Levels, Crop, etc.) and the batch continues.

 

I pause a batch to do some other interactivity (Healing Brush) and the batch won't continue.

 

Strange 'design' if you ask 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 ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

When it comes to actions, tools are different to other commands. Different types of interactive use.

 

You originally mentioned Image Processor, now mention Batch, so I'm not sure which is being used.

 

Anyway, my understanding has always been that Batch, Image Processor, Image Processor Pro, Picture Processor are often intended for non-interactive, "hands free", walk away and come back later processing. They can be used interactively to some degree, however it would depend on the action step on whether it breaks the batch or not.

 

So perhaps an expectation issue?

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 ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

Image Processor Pro uses doaction Stopping an action in Image Processor Pro will terminate the image processor pro execution.

 

Jazz-y script is also terminated however the the Script has created a resume point information in case an action is stopped.    Like Actions with stop step can be resumed using  the Action Play button,   Jazz-y script can be started and it will use its resume point information  and be able to continue the batch process from where it  was terminated.   If jazz-y scripts ends normally the will be no resume point information. 

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 ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

Thanks JJMack, I have not tested what will break the IP/IPP/PP scripts. I rarely, if ever, use batch interactive action processing.

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
Guide ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

@JJMack , you explain everything so well, that even I understood how my script works 😉

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