Mac Mail Macro That Uses Keyboard and Mouse?

Hello! I'm brand new to Keyboard Maestro and am trying to figure out how to use the keyboard and mouse (or even just the mouse).

Here's a video of what I'm trying to do.

Typed out the steps are:

  1. See a message from a sender I'd like to include in my "Promo by Sender" rule.
  2. Hit the keyboard shortcut to activate it
  3. Open the message
  4. Click the sender's name
  5. Copy sender's address
  6. Open preferences
  7. Click on Rules
  8. Double-click "Promo by Sender" rule
  9. Add sender to rule
  10. Click save
  11. Click "Ok" on the "Apply to All?" dialogue

Any help greatly appreciated!

Welcome aboard!

Someone gave me a macro years ago, and I think it still works. I haven't had to use it in a while.

I know this macro will probably look scary to you, but I think you'll only need to change one line, so even if you don't understand it completely, it hopefully won't matter.

Here's a screenshot, then I'll explain what you need to know below it, and include the macro itself.


The macro uses a JXA (JavaScript for Automation) script, but like I said, you'll only need to change one line:

var strRuleName = 'Headhunters',

Change the text inside the quotes to the name of your rule.

Then to run it, just select the email or emails, and launch the macro however you want. It should do most of what you want. I think. :slight_smile:

Add emails of selected Mail messages to Headhunters rule.kmmacros (29.9 KB)

Let me know if you need help. By the way, I could give more instructions on how to download it, install it, add a hotkey if you want, etc., but I figure it's always a good idea to let people try and figure things out themselves first. If you get stuck, let me know.

1 Like

This looks great! I've done a little bit of programming so this doesn't look too bad. Thank you!

Also, here's another version I got from a guy on Upwork.

To make this one work you'd have to change
rule "Promos By Sender"

to whatever the rule name you have is.

The possibilities feel endless! Excited to learn some AppleScript!
Mail - Add Email to Promos By Sender.kmmacros (5.1 KB)

Awesome. I hope it helps.

I've done a little bit of programming so this doesn't look too bad.

Very cool. You're in for a treat, with Keyboard Maestro. Just remember that it's extremely deep, so it can take a while to digest how it all works, so don't get frustrated. (I'm speaking from personal experience.) :slight_smile:

1 Like