How to run Photoshop batch via Javascript (vs manually selecting all attributes?)
Hello,
I am currently attempting to speed up my Photoshop workflow via Javascript.
One of the things you can do inside of Photoshop is, by pressing Control + [period], you can run an action that you've recorded in a big batch (instead of doing it individually one at a time), where you specify the source folder of images to be acted upon, and then the destination folder that you want them saved to once the batch of actions has been completed.
One of the actions I do in a big batch, for example, is take images of a certain size, and simply resize them for use at another step in the workflow. This is recorded as an action, and the way it works is: You come into Photoshop, select your "Set" which contains a group of actions, select your "Action" which performs the action on a given file, then select the "Source Folder" of images to perform these actions upon, and then finally, the "Destination Folder" where the finished output gets saved to after the action is performed upon it.
It would really simplify the workflow if I could just write a couple of Javascript programs that functionally accomplish the same thing -- because instead of having to pull up that dashboard each time, specify the set, specify the action, find the source folder and select it, then find the destination folder + select it as well -- since this process is standardized and the exact same each time in my workflow, it would just really simplify things and speed it up if I could just write a Javascript program once, and then just run that program each time I need to do this.
Basically I do batches OF the batches in this workflow, so being able to execute this faster would just speed it up and simplify it. So instead of pulling up that dashboard, selecting the set, selecting the action, finding the source folder, and finding the destination folder, then being able to run it from there -- and having to repeat this dozens of times -- I could instead just set up the workflow to where it's basically: Run Javascript Program 1, Run Javascript Program 2, etc, to more quickly complete this step in the process.
It seems like this would be an extremely simple chunk of Javascript code, because it only needs to accomplish four things:
Specify the set
Specify the action to use within that set
Specify the source folder
and 4) Specify the destination folder.
However I can't seem to find any online resources that clearly explain how to go about doing this via Javascript, instead of having to do it manually.
Is there anyone experienced with Javascript + Photoshop who knows how to do this and could help me out? I'd really appreciate it!
Thanks
This Adobe PDF reference definitely seems to contain the pieces needed to make this happen -- namely on p. 47 + 68 of the document, where they cover Batches -- however I have zero clue how to go about piecing these chunks of code together so that it would actually run the batch.
If someone could simply piece together a template of such code for me -- then I could just change the template variables (e.g. for "Set", "Action", "Source Folder" + "Destination Folder" -- it would be enormously helpful!
Here is the Adobe template I mentioned: photoshop-javascript-ref-2020.pdf
I am willing to pay for help with this if needed
