Tip - Using Keyboard Maestro to Indicate the State of Something

(Thanks to @JimmyHartington for starting me to think along these lines.)

I love the new KM 10 Progress Bar Action and have been finding more and more uses for it.

In the past I wanted to be able to show a visual indication on Screen for when something was set in a certain state.

For example, in Adobe Illustrator I have a Macro that enables or disables "Snap to Point" (whether dragged objects snap to other objects or not). I wanted Keyboard Maestro to float some sort of window on screen that told me if I was in "Snap to Point" mode or not.

(Illustrator itself doesn't show any indication of whether Snap to Point is Enabled or Disabled - other than me having to drag an object near something else to test if it snaps or not...)

This EXAMPLE Macro shows it better than I can explain...

(Each run of the Macro either opens or closes the Pod Bay Doors depending on whether they were open or closed the last time the Macro was run.)

Screen Recording 2021-11-22 at 13.32.57-Animated GIF Small

By the way, if you run this - to close the Progress Bar Window just click the little cross in the top left corner (as happens at the end of the GIF).

image

EXAMPLE - Progress Bar to Indicate State of Something.kmmacros (4.7 KB)

How the Progress Bar shows itself is all to do with the Value typed into the Progress Field in each Progress Bar Action:
image

-1 caused the Progress Bar to pulse from side to side
99 shows the Progress Bar "full"
0 shows the Progress Bar "empty"
100 closes the Progess Bar

For my actual use in Illustrator I wouldn't have the Progress Bar pulsing - but it seemed to suit the Pod Bay Door Example :grinning:

Here is my actual use in Illustrator:

Screen Recording 2021-11-22 at 15.19.41-Animated GIFF Small 12fps

6 Likes

Today, thanks to @chanpua I found a much more elegant way to do this...

(The example problem that I used above is that Adobe Illustrator itself doesn't show any indication of whether Snap to Point is Enabled or Disabled - other than me having to drag an object near something else to test if it snaps or not...)

Use the Action Mark Macro to set the Macro to be Marked or Unmarked depending on the toggle of the two actions it is doing and you can get a check box in the Palette to indicate the state of things. And the check mark appears and goes, whether I press the hot key for the Macro or click on the Palette.

Until today I had no idea the Action Mark Macro existed.

Screen Recording 2022-03-23 at 14.20.40-Animated GIFF 640 12fps

Click to Show Image of My Example Snap to Point In Illustrator Macro

4 Likes

Hi Zabobon, brilliant macro. i'm trying to recreate your macro but i don't understand what's missing (the arrows). Analogous to your macro, it should say "Fenster abdocken" in my case. How do I get that in there. Sorry, I am a beginner :slight_smile:

Thanks for your help

here is my intention

Hi @Frankb
Where you have your two red arrows you need to choose “This Macro” and then you will see it shows the name of your Macro. And one Action should be set to “Mark Macro” and the other set to “Unmark Macro”. You will need to experiment to see which way around. Hope that helps!

Ok, I will try :slight_smile: but how will I get/see the Palette with the check box?

Mhh, the macro works, but I have no palette...

The Macro has to be in a Group that is showing a Palette.

The usual way is to make a Group for Macros that you want to work in a specific Application. You set that Group to be active in the application. You then set the Group to show/hide a Palette when you press a hot key. Then your Macro will show in that Palette. The “Mark Macro” will show a check mark or not over whatever icon you have chosen for your Macro. I chose a blank white background as the icon for my example so that I could see the check mark clearly.

https://wiki.keyboardmaestro.com/Macro_Groups#Macro_Groups

Yes, works!
image
Thank you for your patience, Zabobon :smile:

1 Like