Help building a macro to compress Finder selection with external script + show progress bar

Is it your echo statements that you want as "progress", or something else? (It doesn't look like it's the output from zip since you've got the -q in there.)

Those echos will be returned to KM, but only after the script has completed -- so not much use as a progress indicator.

You could post those echos back to KM variables using osascriptand then constantly refresh your "Custom HTML Prompt" to pick up any changes. Or you could use the "Execute a JavaScript in a Custom Prompt" action to push changes to the Prompt -- either passing the values to a macro as a parameter or by creating and running the macro on-the-fly within your shell script (see A KM Prompt in a Python Script for an on-the-fly example, albeit in a python script).

1 Like