Hi MPU visitors. Thanks for stopping by.
You can find a bunch of Keyboard Maestro related links on my public Pinboard with the _KM_MPU tag. Otherwise, poke around and try building some cool stuff with Keyboard Maestro. Comments are always welcome.
I’ve written previously about Keyboard Maestro variables. Last time I showed how a variable in Keyboard Maestro could be used to create a push and pop mechanism for the finder. In that case the trick was to pass the variable into an AppleScript. Here’s another example using variables in Keyboard Maestro except this time I’m going to perform a calculation with variables right in the macro
Here’s a macro to determine the change in coordinates of a mouse cursor.
This might make the bash people out there smile a little bit. If you love the push and pop functions on unix, this pair of macros bring both to the OS X Finder.
The core of each macro is an AppleScript, so these could easily be ported to LaunchBar or Alfred.
Macro 1 - Push The Push macro grabs the currently viewed folder path and saves it to a Keyboard Maestro macro.
I was recently wasting some time playing with an idea. I wanted an easy and quick way to grab some text in any arbitrary application and pop over to MultiMarkdown Composer to do some editing. I also wanted a way to pop the text back into the original app when I was done.
You might be yelling at the screen right now telling me to just use the cmd-tab to switch back and paste the text.
Sometimes I just need a quick screenshot of a popup or some other ethereal on-screen element. There's no good way to take a screen shot of, say, a pop-up Keyboard Maestro palette. Once the palette is triggered, any keyboard or mouse interaction will dismiss the pop-up. But it is possible:
That's my palette for taking screenshots. See that one at position 4? That's the secret. It's a macro for a timed screenshot of the desktop.
I've enjoyed Brett Terpstra's recent posts on Keybinding in OS X. Very interesting stuff. I figured I could perform the same tasks using basic Keyboard Maestro actions and sure enough, it's pretty simple.
The basic macro goes like this:
The macro is triggered by a hot key after selecting some text to surround with a parenthesis. The first action is to cut the selection. Next, the clipboard is piped into a variable.
After posting one of my macros for Keyboard Maestro @hiilppp tweeted that there is a simpler way: Create a service with one line of Shell script. That is simple, but I have more services than I care to admit. So I started to play around with various methods of triggering scripts and macros. I am not a savant with LaunchBar, TextExpander or Keyboard Maestro, so there may be better solutions that what I describe.
Here's another quick macro that comes in handy. I often will create a list of items and later I will want the list to be in alphabetical or numerical order. I do it enough that I created a Keyboard Maestro macro for the function.
Given a list like this:
Item 3 Item 1 Something borrowed Something blue Something Blue Alphabetical would be better I can select the items, trigger the macro, and get back this list:
I have been recently shifting a large chunk of my TextExpander snippets to Keyboard Maestro. I still plan to use TextExpander for basic snippet expansion but I find the depth of Keyboard Maestro allows me to build custom tailored tools that fit their intended uses much better.
For example, here a juiced up version of a snippet for inserting Markdown references from Safari. First, here's what my TextExpander snippet did:
Another simple but incredibly enjoyable Keyboard Maestro macro.
There are two predictable things about my daily workflow.
At the end of the day, my Mac desktop will be filled with open windows of all kinds. At the beginning of the day I will be annoyed by all of the open windows blocking my view of OmniFocus, BusyCal and Mail. I created a simple Keyboard Maestro macro to rectify #2.