Probably there are some command-line programs that will also do this type of conversion. Maybe one of the shell script gurus, like @tjluoma, will come along and offer some suggestions.
When you use a Keyboard Maestro variable in a shell script, you have to preface it with $KMVAR_
In my example, I use the variable i but you don't have anything that sets the variable i
I don't have the correct syntax handy and I'm not entirely sure what you're trying to do. Are you trying to read filenames from a file or from selected files in the Finder.
I spent about 15 minutes with automator today for the first time and was able to do achieve this pretty easily thanks to everyones help! Might spend some more time in here as it seems to be pretty powerful.
This thread helped me quite a bit but since there was no final solution, here's a working macro that I'm now using. Tweak as required of course but this one will:
Monitor macOS Desktop folder for new screenshots
Rename screenshot file to timestamp format for better sorting and renaming
Convert PNG to JPG, for smaller filesize
I'm sure it can be optimized but it works fine despite a lot of steps. HTH someone.
Hi @tjluoma Im trying to do something similar to this changing all incoming pngs to jpgs but Im unsure of the syntax when used together with Keyboard Maestro variables. Can you still use the % to change file format on the output file?
Thanks!
Trond
Also if I change change the image type with search replace it works, but the filename of the output file ends up in a crazy format. Like this:
10.08.202102514.png -> .10.08.202102514.jpg.60T39-vK0K
I almost always use external script files, so I’m not sure, but I think that when you use % in Keyboard Maestro’s editor, you might need to use %% so that Keyboard Maestro doesn’t try to interpret it as a Keyboard Maestro variable.
@tjluoma, I wanted to say a big, belated thank you for the JPG screenshot switch tip, that works perfectly. That allows me to save a bunch of steps in my "watch for screenshots" macro, and also helps with the screenshots to clipboard function of course. Cheers.