For Each Action now has its own Progress Bar KM10

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 inbuilt For Each Progress is.

Screen Recording 2022-02-09 at 12.33.33-Animated GIFF 640 12fps

EXAMPLE- For Each Progress WIth Custom Title.kmmacros (6.6 KB)

Click to show Macro

EXAMPLE- For Each Progress WIth Custom Title

6 Likes

That's a great find @Zabobon!

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?

6 Likes

I was thinking the same. Having the inbuilt For Each Progress Bar display whatever the For Each Action has been named would be great.

4 Likes

Noted.

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.

5 Likes

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.

3 Likes

@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.

Thanks for considering my request.

6 Likes

Noted.

2 Likes

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.”

3 Likes

@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 Each Title if has been renamed. Yet another, albeit a little ugly, would be to use a Title coded in the For Each Note, e.g., PB:Custom Progress.

Thanks for considering these suggestions.

2 Likes

Considering using the For Each action title or other options for the title is on the wishlist already.

2 Likes

Thanks, @peternlewis. In the meantime, I'll add the actions to do the arithmetic. :wink:

1 Like

Done for the next version.

6 Likes

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.

Done for the next version.

8 Likes

No.
.
.

Thanks Peter!

2 Likes

Man what a time to be alive. These new progress bar features are going to be very helpful. Thanks @Peter for taking the time to develop them.

4 Likes

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!

5 Likes

Brilliant. This is going to make setting up Progress Bars for any particular group of Actions much simpler. I really like Progress Bars!

5 Likes

Progress bar for group action?! BRILLIANT! Oh this is going to be so cool. [insert take my money gif here]

4 Likes