Created
February 8, 2012 16:38
-
-
Save hmps/1770906 to your computer and use it in GitHub Desktop.
Applescript to control Spotify through Pomodoro
This file contains 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
on ApplicationIsRunning(appName) | |
tell application "System Events" to set appNameIsRunning to exists (processes where name is appName) | |
return appNameIsRunning | |
end ApplicationIsRunning | |
if not ApplicationIsRunning("Spotify") then | |
open location "SPOTIFY-URI" | |
delay 10 | |
end if | |
tell application "Spotify" | |
play | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment