One Click Pause, Play and Hide

KeyboardmaestroWhen I listen to my favorite music streaming site, Rdio.com, 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

Advertisements