Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ppcg4mac

macrumors 6502
Original poster
Feb 13, 2012
372
1
Northwest Kansas
I have been trying to make some applets that control Spotifys music playback, i have don this with itunes before. When i make the play/pause one it says that playpause is not recognized, yet it is in the Apps dictionary. Can someone help me on this.

what im typing is this.
Code:
tell application "Spotify"
playpause
end tell

why is this not working here?
 
Look at Spotify AppleScript dictionary

Take a look at the Spotify dictionary in scripteditor to see
how to use it with Applescript.

Found this on Google :

PlayPause.scpt :

Code:
tell application "System Events"
	set MyList to (name of every process)
end tell
if (MyList contains "Spotify") is true then
	tell application "Spotify.app" to «event spfyPlPs»
end if

NextTrack.scpt :

Code:
tell application "System Events"
	set MyList to (name of every process)
end tell
if (MyList contains "Spotify") is true then
	tell application "Spotify.app" to «event spfyNext»
end if

PreviousTrack.scpt :

Code:
tell application "System Events"
	set MyList to (name of every process)
end tell
if (MyList contains "Spotify") is true then
	tell application "Spotify.app" to «event spfyPrev»
end if

Disclaimer : I don't use Spotify so I couldn't test these scripts.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.