I got a bit bored on leave and created this. Replace the http url to your spotify playlist and save it as a run only application. With this and setting my mac to auto power on after a power outage i can automatically have tubea playing when i get in by flicking the switch :)
http://www.belkin.com/uk/conserve/switch/
Unfortunately had to killall Spotify to start with so that it wouldnt keep playing the same song along with some trickery with the volume!
try
-- Kill Spotify
do shell script "killall Spotify"
end try
-- Pause 5 seconds
delay 5
try
tell application "Spotify"
activate
end tell
-- Make sure shuffle & repeat is on
tell application "Spotify"
if shuffling is false then
set shuffling to true
if repeating is false then
set repeating to true
end if
end if
end tell
delay 1
-- Open the playlist via a web browser. Customize this your own playlist.
open location "http://open.spotify.com/user/kdog79/playlist/2489FoNrgU1e4ItOm4ubOw"
tell application "Spotify"
set sound volume to 0
end tell
delay 5
tell application "Spotify"
next track
end tell
tell application "Spotify"
next track
delay 2
set sound volume to 100
end tell
end try
Very useful if someone keeps playing dreadful hotchip in the office!
