Created
September 3, 2014 02:28
-
-
Save col16/61b9bdd85a857ddc73c2 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
osascript <<EOD | |
display dialog "Ready to play song?" | |
tell application "Spotify" | |
set current_volume to the sound volume | |
if (player state is playing) then | |
repeat | |
repeat with i from current_volume to 0 by -1 | |
set the sound volume to i | |
delay 0.05 | |
end repeat | |
pause | |
set the sound volume to current_volume | |
exit repeat | |
end repeat | |
set the sound volume to current_volume | |
end if | |
pause | |
play track "spotify:local:::iStock_000021410538Wav48000:173" in context "spotify:user:col16:playlist:20gspPN5TiwzVNqnciD7uT" | |
end tell | |
EOD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment