Calling RetroBatch from the a script

Hi all,

RetroBatch Pro version 2.2.2 [non-MAS version], macOS 14.7.5. For a while now I’ve been using Hazel to do some processing of images. One of the steps calls Shortcuts to run a RetroBatch workflow. Apple muffed up 14.7.5 and forgot to give /usr/bin/shortcuts proper authority to be run. See /usr/bin/shortcuts no longer works in 14.… - Apple Community

After trying multiple ways to get around this, I finally figured I would look more into RetroBatch itself to see if I can call it from a script - and yes I can! And now using a simple embedded script in Hazel, my workflow has been restored. Using this simple script, my Hazel workflow works great:

/Applications/Retrobatch.app/Contents/MacOS/Retrobatch --workflow /Users/wsb/RetroBatch\ Workflows/Process\ Product\ Images.retrobatch

[the workflow itself looks in a particular folder, so that’s why I did not specify a folder on the command line].

But being a nitpick here - when /usr/bin/shortcuts called my RetroBatch workflow, the graphical app itself never opened. But I noticed that when I call RetroBatch from this shell script, RetroBatch [the GUI] briefly opens and then closes. Is there an argument to the command line version of RetroBatch that nixes this behavior? Semi-related, is there a list of arguments that the command line version accepts? I tried -h and --help to see if a list of arguments would display, but they didn’t.

TIA!

Hello, and welcome!

Retrobatch’s GUI will (currently) always open up to run the workflow, but I’ll see what I can do in a future release about keeping it hidden.

The only arguments it currently accepts are --workflow and --output. I’ll see about adding a -h argument as well.

thanks,

-gus

1 Like

Thanks for the quick reply, Gus. I can’t test it now due to /usr/bin/shortcuts no longer working under 14.7.5, but I am fairly certain that when I was using Hazel to run a shortcut that runs my RetroBatch workflow, the RetroBatch GUI never opened up and quit.

It probably is not super important as the opening of the GUI doesn’t steal focus, which would be my main concern [since I multitask while Hazel/RetroBatch/JPEGmini Pro/etc do all their work].

Thanks so much for making the CLI version - being able to use a script to call it is a lifesaver here, as I’ve relied on /usr/bin/shortcuts for so long for so many things, and now Apple took that away in the 14.7.5 update.