Created
October 15, 2018 19:09
-
-
Save matiasvillaverde/e00d30921ba348d423acd8eae431e39e 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
# 1) Create an Applescrip, paste this code and save it as .app | |
# 2) Create an Event in Calendar at the time you want to wake up | |
# 3) Set custom Alarm to 'Open File' and select this script.app | |
# Volume | |
set morningVolume to 40 | |
# Happy Music to wake up | |
set morningTrack to "spotify:user:1243225188:playlist:09eeF2PyFuynRTXtIM0mew" | |
tell application "Spotify" | |
# Open Spotify | |
launch | |
delay 3 | |
# Configurate | |
set the sound volume to 0 | |
set shuffling to true | |
play track morningTrack | |
# Increase volume | |
repeat 10 times | |
if sound volume is less than morningVolume then | |
set sound volume to (sound volume + 10) | |
delay 3 | |
end if | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment