Skip to content

Instantly share code, notes, and snippets.

@elvisciotti
Last active September 9, 2018 13:21
Show Gist options
  • Save elvisciotti/1b2e8ba629683b2da954d550227ae2b4 to your computer and use it in GitHub Desktop.
Save elvisciotti/1b2e8ba629683b2da954d550227ae2b4 to your computer and use it in GitHub Desktop.
Apple script tolaunch spotify and increase volume gradually
# To install as alarm, add this to crontab (crontab -e)
#30 8 * * 1-5 /usr/bin/osascript /Users/elvis/Documents/wakeUpSpotify.scpt
set volume 3
# morning playlist
open location "spotify:user:elvispm83:playlist:5D8fO5FikywbgjOOeICk2e"
delay 5
tell application "Spotify"
set the sound volume to 20
# fuya y misterio
# play track "spotify:user:elvispm83:playlist:5D8fO5FikywbgjOOeICk2e"
# washington
play track "spotify:track:1c7JxLdGRCCf7ohmDZbpdV"
repeat 10 times
if sound volume is less than 80 then
set sound volume to (sound volume + 10)
delay 30
end if
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment