Using Keyboard Maestro to Insert Titles and URLs in MarsEdit

The following macro copies the selected title of an article and then switches to MarsEdit and pastes the title. It then switches back to Safari and copies the URL for the article, and finally switches back to MarsEdit to add the link. This macro does exactly what you would do manually, but it does it with a simply keyboard shortcut trigger. I tried using Keyboard Maestro’s Set Clipboard to Past Clipboard action to reduce the switching back and forth between apps, but that macro didn’t work consistently.

You can see a video of how it works, here. I slowed the maco action down some so you can better see how it’s done.


One Click Pause, Play and Hide

KeyboardmaestroWhen I listen to my favorite music streaming site,, I typically have to pause what is playing in its Mac desktop player in order to answer the phone or when I’m dictating an article, as I’m doing now using Dragon Dictate. In order to save myself a few clicks in order to pause or play Rdio, as well as to automatically hide it, I created two little click-saving macros using Keyboard Maestro.

One Click Pause and Play

To pause or play music in Rdio, I set up a macro that activates these menu items when I click on the Rdio icon in my Dock and brings the application briefly to the front. If music is playing, the macro pauses it; and if not, it resumes play.

Keyboard maestro 1

The macro is triggered by the Application trigger, which executes a keystroke simulation—in this case, the Spacebar key.

Automatic Hide

To save yet another click or keyboard shortcut, I use a macro that automatically hides a designated application when it is no longer in the forefront. So in this case, when I click away from Rdio, this macro will hide it after 15 seconds.

This macro is triggered by the Application trigger, which executes a 15 second pause action, followed by a “If Conditions Met Execute Actions,” and an AppleScript action.

Keyboard maestro 3

You cut-and-paste the AppleScript script below, be sure to replace the name of the application in the script with the one you’re building the script for.

tell application “System Events”
set visible of process “Rdio” to false
end tell

Creating an App Droplet in Keyboard Maestro

Screenshot1720Because the developers of QuicKeys have still not upgraded their application for OS X Lion, I have moved over to Keyboard Maestro. I’ve always thought both programs were nearly equally as good, but since I discovered and started using QuicKeys first, KM laid dormant in my Applications folder because it didn’t make since to run both Mac automation programs on my computers.

I’ll write more later about what I like about Keyboard Maestro, but I thought I’d do a quick little tutorial about how to make an application droplet in KM. I wrote the developer of KM and he wrote back and explained in a brief sentence how to create a droplet. But I thought I’d illustrate it here for newer users of Mac automation, Keyboard Maestro in particular.

What is a droplet? Well, it’s sort of acts like an application. While most of the automations you build in KM are triggered by either a keyboard shortcut, an application, typed string, or through the KM status menu, you can also create a droplet for any KM macro and launch it say from your Dock as you would an application or file. Here’s an example:

I use a macro that launches my most used applications. These applications could be of course automatically launched when I log into my account, but I don’t like that option because sometimes when I’m trouble shooting a problem on my computer, I don’t want all those apps launching when I’m experiencing problems.

I could also easily set a keyboard shortcut to trigger that macro, but I simply don’t use it enough to warrant a keyboard shortcut. Instead, I created a droplet that I can simply click in my Dock. Here’s how you do it.

1. Select the macro in KM that you want to create a droplet for.

2. Under the triggering section of the macro, select “Or by script,” and then select “Or by Apple Script.”


3. Voila, KM makes an instant AppleScript script for your macro that you save as a droplet/application.


4. Unfortunately you can’t turn a KM macro into app inside of KM, as you can in QuicKeys. But that’s not a real big deal, because you probably won’t be using droplets a lot to launch your macros.

5. So what you do is copy the AppleScript script. Launch AppleScript Editor (located in your Utilities folder, which is located in your Applications folder) and paste the copied script in the new file.


6. You might want to click the Run button to test it out. Then save it as an Application. I would suggest putting your droplet/apps in one place, say a folder you create in your Applications folder so you can easily access them.


7. Now drag that droplet to your Dock and you can launch it from there.


Paste Selection Into Last Application

Do you copy and paste text from one application, say your web browswer, to another app, say some Twitter app or Facebook? If you do, I understand your pain. With this Keyboard Maestro shortcut, you can do the process with one hot key, or keyboard shortcut. Watch the very short video below. In which I copy and paste a headline from Safari into a new Tweetie box using only one keyboard shortcut.