It's interesting just how many more Actions I had to bolt on to do this (i.e. to use the Display Progress Action rather than the inbuilt gear enabled one).
The inbuilt For Each Progress automatically knows how many steps to take. So, to replace with a standard Display Progress Action, I had to work out how to add up the number of steps (depending on how many items in the Finder were selected or whatever other For Each task I might be doing). And then make each step a percentage of the total. That all required quite a lot of Actions. Anyway, included below for your interest is the demo I made. The advantage is that the title of the Progress Bar is my choice and it can indicate more info (in this case the percentage).
So, all in all it shows how convenient the inbuiltFor Each Progress is.
I checked in the KM10 release note and this feature is listed - but who knew??
The other day I was contemplating adding a progress bar to one of my more complicated macros: it has 3 For Each actions, one inside the other and I gave up on the idea since I'd have to do a lot of extra work setting up the progress bars - just as you described.
So after reading about your discovery, I took all of 30 seconds to edit my macro and as if by magic I can now see how it is progressing. So a big thank you!
The only downside (as you said) is that you can't set the progress bar title so it's not immediately obvious which For Each action it refers to.
But I've had a thought about that and it is a feature request to @peternlewis: can the text that appears in the built-in progress bar be taken from the name of the For Each action, so that by renaming the action it would make it obvious which For Each the progress bar belongs to?
Sorry, I have not gotten back to posting tips about the v10 release, although I didn't include the Progress Bar in my list of tips I should post about so it is good that this topic was made.
I've been enjoying that since updating to KM 10. I have several (almost) daily for each macros I run, and that's been incredibly helpful and satisfying to watch running them.
@peternlewis would you consider implementing an an inbuilt Progress Bar in the Group Action, enabled with the Gear Menu like For Each Action? KM could count the number of enabled actions in the group and increment the Progress Bar as each action finishes. The Progress Bar could be named using the name of the enclosing group.
It strikes me that this would address the most common use case, and make the UX for using a progress bar smoother.
I’m reminded of a former boss, the VP of Engineering at a small startup, saying to the entire Engineering Department, “If it’s not documented, you might as well not have built it.”
@peternlewis, the progress bar is a great enhancement. Thanks for adding that feature to Keyboard Maestro.
Since there is only one progress bar, for a For Each progress bar, would you consider changing it such that it inherits the Title from the Display Progress action?
If you made that change, then I would use the new action immediately before the For Each loop, then use the one built into the For Each action.
Another possibility to consider would be to use the For EachTitle if has been renamed. Yet another, albeit a little ugly, would be to use a Title coded in the For EachNote, e.g., PB:Custom Progress.
That's great, thank you @peternlewis. Out of interest will there be any editable title as in the standard Progress Bar action? I have found that to be very useful.
Thanks so much for implementing this, Peter! This will be quite helpful. P.S. -- Thanks for being so open to user input. That's one of the many reasons why KM is an absolute must-have for Mac users. Cheers!