Retriev3r
5/22/2015 - 7:19 AM

Launch Spotifree together with Spotify and sound the music :)

Launch Spotifree together with Spotify and sound the music :)

# Toggle Function (close if open & open if closed)
on ToggleApp(appName)
	if application appName is running then
		tell application appName to quit
	else
		tell application appName to activate
	end if
end ToggleApp

# Launch or kill the incredible Spotifree together with Spotify
ToggleApp("Spotifree")
ToggleApp("Spotify")

# Wait 5sec for Spotify to load fully
delay 5

# and then let the music play
tell application "System Events"
	if (exists process "Spotify") then
		using terms from application "Spotify"
			tell application "Spotify" to play
		end using terms from
	end if
end tell