Interesting ways you use Keyboard Maestro?

I'm on some Reddit subgroups and whenever someone starts a discussion of the most useful Mac app, I always evangelize KM. Someone asked me what specific use cases it has, and I replied "it can do anything." But since that's not immediately useful for a random reader who doesn't already know KM, I want to create a "master list" of examples and start a discussion there. (I'd also like to develop something and work with a youtube to get a video made for automation obsessive people like me.)

Here's a short list of things I do with KM:

Opening apps with keyboard
Having β€œdouble keypress” options, so I can do one thing if I hit option+control+c once, or do something if I hit it twice
Performing actions at set times of day, or as the result of a string. For example, I have shortcut strings to call different categories inside my own website that I need to access often for posting to social media.
Execute AppleScript or javascript or terminal commands as part of larger macros
Scheduling things that couldn't be scheduled, like UI scripting via β€œclick on found image.”
Allowing me to pass information between Filemaker and AppleScript via Keyboard Maestro variables

Can anyone help me add to this list? What do you with Keyboard Maestro?

3 Likes

One of my macros is designed for specific use cases, which I recently wrote about. Here is what the macro does:

extract all MP3 files, save the duration and chapter titles of each file, merge all those MP3 files into one file, and calculate the durations. Based on that, add chapter markers, which I can then navigate in my podcast app of choice, Overcast.

4 Likes

one of my biggest uses is setting up keyboard shortcuts for web apps that dont support them natively. e.g. opening or navigating to search, pressing save, opening the menu etc...

3 Likes

That was a great read, thanks! Have you shared the macro by chance?

1 Like

Yes, I basically automate dozens of social media posts with KM, clicking on found images to simulate doing it all myself. It allows me to stay somewhat sane since I can watch youtube while I do that part of my work.

2 Likes

I have not done it yet. I may do it, but the macro needs to be cleaned up before sharing, and I'm not sure that I will publish it.

For those new to Keyboard Maestro, I often showcase how it can automate various manual tasks on a Mac. Here are some of my frequently used macros:

  • Automate the process of copying email content, parsing it, and entering expenses into MoneyWell, which streamlines data entry.
  • Take screenshots of browser windows with options to either open them in CleanShot or save them directly to a designated folder. See example here.
  • Create shortcuts for my most frequently used snippets using the Prompt with list action.
  • Convert CSV files to TSV format in Sublime Text using a command I have set up.

Whenever I find myself spending too much time on a task or frequently switching between applications, I take a moment to consider if I can create a macro to simplify the process. I'm also on the same boat when trying to recommend Keyboard Maestro to people who are new to Mac.

1 Like

"Interactive SOPs".

Say you've got a multi-step workflow:

  1. Open up www.example.com/form
  2. Search using today's date
  3. Copy the results
  4. Make a new email
  5. Paste in the search results
    ...etc

You can start with a macro that's simple series of prompts as to what to do, and follow those rather than referring to a list:

Then enhance those actions with relevant tokens:

image

Start replacing the reminders of what to do with KM actions to do it for you:

And so on.

You're starting with something anyone can build and which will make life easier from the get-go. They can expand on it with easy actions, while still doing "complicated" stuff by hand -- just open the web page, worry about JavaScripting the DOM later! And even if they never get close to a completely automated workflow they'll have saved themselves a load of drudge-work with minimal effort.

1 Like

I use KM all the time, but I also use it for something that's probably fairly unique. I use it to automate some things on my PS5, in Gran Turismo 7, using the PS Remote app running on my Mac.

I don't use it to play the game, of course. But in GT7, in online racing, they sometimes let us change various settings for a car. Unfortunately they don't let us save the settings.

image

 
So I wrote one macro to OCR the various settings and save them to a "profile". When I want to apply them, I hit a button on my Stream Deck and it automatically enters the settings.

It's actually more involved than it sounds, since all of the settings use sliders to enter the correct values:

image

 
and I have to know how much to move the slider to get to the value I want.

I also use it to switch to a couple of "stats" screens and capture some data, so I can automatically enter it into GranTracker, which is a program I've written.

I keep thinking I'll do a writeup on it someday, since it showcases some rather unique KM methods.

3 Likes

That's a great use!

I do the same thing.

I use KM to manage my Windows-based media server for my radio show via buttons on my iPad. The server is 10 feet away from my workstation, but KM can do way more automation than any Windows app I know of (or care to learn).

I connect to the Windows media server via Google Remote Desktop running in a dedicated browser (Vivaldi). With a combination of Found Image and Send Shortcut To actions, I have about three dozen tag and organization macros that pass through Vivaldi to the remote server to manage new music received on Fridays and plan the week's show.

I use some KM palettes, but mostly the Elgato Stream Deck app running on my iPad in front of my keyboard to fire the KM macros. One of the two SD screens is below.

2 Likes

I always have this issue because Keyboard Maestro macros tend to be very personal.

But here are a few of mine:

  • Download statements from my bank (after I log in, no banking passwords should be saved!) and file them in appropriate folders.
  • Automate creating invoices or other pdfs and attaching them to mail messages
  • Update my desktop with a satelite image.
  • Logging in to various web sites (eg my CCTV or solar power sites).
  • OCR the clipboard.
  • File email.
  • Adding videos to β€œwatch later” application.
  • Reporting service monitoring failures.

As well as the simple ones like opening applications or websties, or typing snippets.

6 Likes

Cool!

Another thing I do, to save my sanity when the stock market is down: a master stock opener. It opens the stockcharts.com website (but the old version, not the new one, which obfuscates links for some reason), then read the source code to find the stocks I need to open daily. It goes through, pulls out a chunk of source code via Applescript, and opens what I need twice a day. Another version of the script will open a more extensive list of things I need to check, flagged stocks or ratios I need to watch semi-regularly.

1 Like

Another one, is that I have Keyboard Maestro palettes with macros that help automate some of my work making PDFs, InDesign documents, and Microsoft Office files Section 508 compliant and accessible to people with disabilities. #a11y

1 Like

Nice, using "found image"? I frigging love that feature.

2 Likes

I use Keyboard Maestro extensively at my work.
All my macOS colleagues have a license and I create macros to help their work.

Below is a small sample of my many macros.

Easy open a network folder
One we all share helps us open a folder from our network drive.
We are an ad agency and have a pretty rigid structure for saving files on the network drive.
My server creates a text file every 5 min. of the structure 3 levels down for folders.
The KM macro then uses this list as input for a prompt with list.
This results in a macro, where the end user can input a job number, customer number or anything else from the folder names and press enter to open that folder.

Structure of network drive:

.
β”œβ”€β”€ A
β”‚   β”œβ”€β”€ A-kassen HKK SID_86822777
β”‚   β”‚   β”œβ”€β”€ 00 Logoer_86822777
β”‚   β”‚   └── 00 Papirlinje_86822777
β”‚   β”œβ”€β”€ A. Winther_86847288
β”‚   β”‚   β”œβ”€β”€ 00 Koder_86847288
β”‚   β”‚   β”œβ”€β”€ 00 Logoer_86847288
β”‚   β”‚   β”œβ”€β”€ 00 Papirlinje_86847288
β”‚   β”‚   └── 00 Salg, support og projektledelse_86847288
β”‚   β”œβ”€β”€ AAB Silkeborg_1014
β”‚   β”‚   β”œβ”€β”€ 00 Designmanual_1014
β”‚   β”‚   β”œβ”€β”€ 00 Logoer_1014
β”‚   β”‚   β”œβ”€β”€ 00 Papirlinje_1014
β”‚   β”‚   β”œβ”€β”€ 00 billeder_1014
β”‚   β”‚   └── 1231650 C4P kuverter med rude

Scan QR- or barcodes
Some of my macros are my own GUI for command line tools.
For ex. zbar, which can scan an image for QR- and bar-codes.
In my design work I sometimes needs to check what a QR-code contains. Instead of taking my phone and scan it, I use this macro.
It takes a screenshot of part of the screen. Runs it through zbar and returns the output to the clipboard.

Keep Microsoft Teams running
At my work we use Microsoft Teams to communicate, and it is a bit unstable. So the app sometimes quit all of a sudden. So to ensure it keeps running, I have a macro which triggers when Teams quit. Waits 10 seconds and then prompts me if I want to start Teams again. The pause is to allow for the autoupdate mechanism of Teams to complete.

2 Likes

I am trying to learn Japanese. I use KBM to scrape text from my Wanikani account and write those strings into Notion so I quickly recall them later.

One trigger will scrape the page using JS, store them as variables, then ping Notion's API to add a row to the notion table. Hours saved.

The other thing I can't live without is Palettes and HyperKey it's a total game changer and no more having to remember hot keys, because ultimately you will run out.

1 Like

You might find some good ideas in this thread on the Automators forum, even though it's a bit old: Why should I bother with Keyboard Maestro?

1 Like