Keyboard Maestro Automation


#1

In the absence (yet) of actions has anyone any experience with automating Drafts For Mac with Keyboard Maestro?

Mostly interested in how easy it is to control that way, rather than specific macros to share. (Though the latter would be nice.)


#2

So far I’ve made a macro to creat a new draft with a particular tag, regardless of where I am on my Mac. I brute forced it with a “click on found image” step to go to the tag field, enter the tag, and go to the body. Not sure if there is a more elegant way. I use this to quickly add a note to my “daily list” workspace.


#3

I think you’re right - unless Cmd+T is good enough for you.

I hunted around for something to use like a menu item and found nothing. But then, on a hunch, tried Cmd+T. It popped up a type in for the tag, with suggestions filled in.


#4

Awesome, thanks. I’m going to dive in and tweak my macro.


#5

Let us know how you get on.


#6

I ended up sticking with the “click on found image” behavior for this. Cmd-T would work differently depending on whether the tag field was already dropped down or not.

For those interested, here is the Keyboard Maestro macro:

You may need to take a screenshot of the tag flag at the top of a draft (hit Cmd-T if you don’t see it), and replace my image in the 5th step, for it to work on your system. You will probably also want to change or remove the default tag I’ve set in the 6th step.


#7

Here’s another Keyboard Maestro macro that will create a new Mail message with the first line of a draft as the subject, and the rest as the body. To run this, make sure Drafts is the active application, and then use Ctrl-Option-Cmd + D keyboard shortcut.

Please note that I keep Drafts in the same location on my screen at all times. You may need to tweak the coordinates in the first step to get Keyboard Maestro to click at the start of the draft depending on how you have things positioned. If anyone knows of another way to get the cursor there, please let me know.

EDIT: this doesn’t work correctly in the Beta that just came out. In the step of the macro that is supposed to select all the text after the first line, the keyboard shortcut instead moves down one draft in the sidebar list.

EDIT #2: I got this working again by overriding the app’s default keyboard behavior. In System Preferences > Keyboard > Shortcuts > App Shortcuts, I added a shortcut for Drafts for “Next Draft” and one for “Previous Draft” and assigned a different keystroke than the one that shows in the app’s File menu dropdown (which interferes with text selection when using keyboard commands).


#8

If you’re having to resort to click on found image that’s pretty dire.

If you’re in the beta programme could we discuss with Greg how a later beta might enable better integration?