Created
January 22, 2013 16:41
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)