Skip to content

Instantly share code, notes, and snippets.

@mreidsma
Created January 22, 2013 16:41
Show Gist options
  • Select an option

  • Save mreidsma/4596136 to your computer and use it in GitHub Desktop.

Select an option

Save mreidsma/4596136 to your computer and use it in GitHub Desktop.
Automagically start playing a Rdio playlist and bring my text editor to the front in full screen mode
tell application "Rdio"
play source "p2128446"
end tell
activate application "Sublime Text 2"
delay 3
tell application "System Events"
set frontmost of process "Sublime Text 2" to true
tell process "Sublime Text 2"
keystroke "f" using {command down, control down, shift down}
end tell
end tell
@mreidsma
Copy link
Copy Markdown
Author

To play a specific track, use the "t" prefix instead of "p" on line 2. To play a different playlist, find the playlist # in the URL of rdio.com and replace this rockin' writing playlist I made.

Change yer text editor, of course, but then make sure the keystroke shortcut matches the full screen/distraction free feature you want to activate (and turn on support for assistive devices in System Preferences > Universal Access)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment