Simple Macros (A thread?)

I continue to believe that one of the things that keeps more people from using Keyboard Maestro is not knowing what they would use it for.

I also think that we who are very familiar with Keyboard Maestro sometimes make the mistake of thinking that only our complex and "impressive" macros are worth sharing.

I'd like to propose that we share some "Simple But Useful" macros that we might have made. (If this has been done in the past, please link to the post.)

Space + Down Arrow (Repeat)

Here's one that I made tonight. I'm not going to use it very often, but I'm going to keep it around because I often run into a scenario where it would be useful.

Tonight I was going through Displays and turning off resolutions for my monitor that I will never use. The app presents a staggeringly-high number of options, but in reality, I want, like, 3.

However, disabling the others meant that I had to go down a list and repeat two keystrokes:

Spacebar. Then the down arrow.

Spacebar. Then the down arrow.

Spacebar. Then the down arrow.

Now, I could do that pretty quickly just by mashing on the keyboard, but inevitably I missed some. Why not let Keyboard Maestro do it for me? So here's what I did:

TEMP - Space + Down Arrow.kmmacros (2.2 KB)

Now, you'll notice that the macro isn't enabled. That's because I don't want to leave the keyboard shortcut active all of the time. Next time I run into a long list of checkboxes, I can re-enable this quite easily.

But now, every time I pressed that key combination, it went through 10 lines. And I never had to worry about hitting the down arrow before the space bar, or hitting the spacebar twice, or the down arrow twice by accident.

Of course I could have increased the 'repeat' counter to more than 10, but that seemed like a good number to me. I pressed it 3 or 4 times and was done.

So… what are your Simple But Useful Macros?

Pair of macros used on a multimonitor setup to move a specific window to different screens:

image

image

2 Likes

1-step macro to make current browser page editable:

image

Interesting JavaScript.
May I ask how you use this? What is the purpose of editing the page?

My professional work involves medical and legal records review in order to determine future medical costs when someone is injured. Sometimes that involves referencing an academic article and then illustrating the key content in that article, often with an explanatory or rebuttal argument.

Making the browser editable essentially gives me an HTML word processor to mix/match content from various sources and then add my annotations in matching boldfaced or italics font or a different color etc.

In truth I can do the same thing using a Devonthink HTML page as my HTML editor, but sometimes I prefer to do some of the editing in the browser.

Totally separately - not the main purpose but fun once in a while - is to edit (usually political) content in a satirical way and send it to an unsuspecting friend as a joke and play along for a while until revealing that it was edited.

I have a JavaScript bookmarklet from somewhere long forgotten to do the same thing, activated with a Keyboard Maestro Hot Key.

javascript:document.body.contentEditable='true';%20document.designMode='on';%20void%200

I regularly save web pages as PDFs and this allows me to remove web site cruft before doing so.

Archive an email in Apple Mail when replying to a message.

I have a group for actions which only work when Mail is open and active. All of my actions for Mail go in this group.

The action itself selects Message > Reply in the menu and then selects Message > Archive to remove it from the inbox.

Reply & Achive.kmmacros (2.6 KB)

Using Command+Return to send emails. This mimics the action in (I think) Airmail and Gmail.

Gmail Send.kmmacros (2.1 KB)

Forward emails to my Omnifocus inbox.

Forward to Omnifocus.kmmacros (3.4 KB)

A very daily macro for me to limit my chat history in iMessage to the most important things:

iMessage text delete <B67B 200825T021357>.kmmacros (41,3 KB)

iMessage text delete <B67B 200825T021357>

*** Löschen would also have to replace Delete here.

I have integrated the AppleScript (KM macro) into BetterTouchTool, so I only need one mouse gesture to run the macro. This saves me another shortcut and the deletion is faster and more efficient.

2020_08_25_Support_11

For moving windows to another desktop I'd use commands at the Window menu:

If I set a KM macro to ignore if Windows->Move to LG UltraFine doesn't appear (on the UltraFine) and similar for the other monitor, two macros do it cleanly.

Except I have 5 monitors, of which 3 are in my primary field of view and 2 others are secondary. My most common "move" is 2 monitors away - that can be done in 1 step with a numerical KM macro or 2 steps with the "Tile Window" command.

Swap last two windows
image

Swap last two applications
image

1 Like

Is there a compendium, of macros, available that others create and share?

That’s what this category - Macro Library - is primarily used as.

Nice solution from @gglick to get your client's address from a plain text file:

Insert Safari URL

One of my most used macros is simple one-step macro with a "Insert Text" action set to the token %SafariURL%. It is triggered by typing ,url

So, where ever needed, the currently open Safari window ist just for keystrokes away and is already so hardwired that I sometimes find myself typing it on my iPad wondering why it would not turn to an URL.

Roland

2 Likes

In addition to all of the topics in this section, "Macro Library", there is the Best Macro List -- KM Forum.

1 Like

When I switched to Mac from PC a prime aggravation was the lack of a forward delete key. Now Shift-Delete triggers space right and then delete.

My second most used macros are '1, `2, etc. They trigger the various email addresses I use many times a day.

Function-Delete serves as Forward-Delete if there's no existing Forward-Delete key. Understandably, you may be a point whereby your muscle memory doesn't care to switch.

1 Like