Retrobatch 1.4 and JavaScript Expressions

Gus Mueller, writing back in March about the then-new Retrobatch 1.4:

There’s a couple of interesting new features in this update I’d like to call out. First up is JavaScript expressions in Retrobatch Pro. Various nodes in Retrobatch which allow you to set the size or length of a value (such as the Crop, Border, Gradient, Adjust Margin nodes) now have an option of running a little snippet of JavaScript code to figure out the value. This is a super powerful feature, which you can read about in our JavaScript Expressions documentation.

First, Retrobatch is super cool. It’s a batch image processor for the Mac — think of it as something like Automator or Shortcuts but just for image processing, with almost all the power of Acorn. It’s a really useful way to effectively write your own custom image processing workflows, which run really fast — but rather than using a scripting language, you do it graphically using nodes. It’s powerful but the experience of creating and tweaking your own workflows is largely self-explanatory.

But sometimes what you really want to do when you’re automating a task is just write a little bit of actual code — the process you want to define is best expressed (or can only be expressed) in code. Being able to just write a JavaScript expression is just what the doctor ordered. I feel like iOS Shortcuts could learn something from this.

Also new, and personally quite useful to me:

And finally for my short list, you can now make a droplet which doesn’t take any files. Why is this useful? Well, imagine you have a workflow that reads an image from the clipboard, resizes it to a specific width, and then writes it back to the clipboard. Now you can make a little droplet to do just this. Just a double click from the Finder (or a single click from the Dock) and your workflow is run.

Thursday, 2 July 2020