I missed this and I suspect I'm not the only one. The For Each
Action in KM10 now has an inbuilt Progress Bar that is off by default, but just needs to be enabled with the Gear Menu:
Say whhaaaa??? (Runs to computer to check this)
Thanks for posting this, I had no idea this existed. At least 3 times a week I wonder how many things KM has/does that I will never actually know about
Are there other actions with this feature?
I think the only Action that has it inbuilt is the For Each
- which makes sense as it is by nature an Action of steps.
KM10 also has a dedicated Display Progress
Action which can be used at stages in a Macro to show progress. The dedicated Display Progress
Action is more configurable. Its title can even be a Variable so, its title can change during the progress.
The inbuilt Progress Bar in the For Each
Action has a fixed title which can’t be changed. But it’s great that it is so easy to enable - by just using the gear menu. I think it will be useful for the building stages of a Macro as a kind of test that the Action is working. Later I think I would replace it with the dedicated Display Progress
Action so that I could have more control over its title.
Thanks for pointing this out. I didn't know about it either.
I missed it too! Even if this is not needed for a final macro it could be useful during development and debugging.
Thanks for sharing this, @Zabobon.
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.
EXAMPLE- For Each Progress WIth Custom Title.kmmacros (6.6 KB)
Click to show Macro
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?
I was thinking the same. Having the inbuilt For Each
Progress Bar display whatever the For Each
Action has been named would be great.
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.
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.
Thanks for considering my request.
Noted.
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 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.
Considering using the For Each action title or other options for the title is on the wishlist already.
Thanks, @peternlewis. In the meantime, I'll add the actions to do the arithmetic.
Done for the next version.
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.