As a newer user to the Messages application on Mountain Lion, I wanted to get the current Spotify track to display on my status(as opposed to iTunes), but couldn't find any readily available code. Once I got it working, I figured there would be others like me so I wanted to provide my code 
Basically, it checks every 5 seconds to see which track is playing and posts it to your available status on Messages. If Spotify is paused, it changes it back to "Available".
If this is not the correct forum to post this, please kindly redirect me
Enjoy!
Code:
on idle
tell application "Spotify"
set theTrack to current track
set theArtist to artist of theTrack
set theName to name of theTrack
if player state is playing then
set playStatus to "playing"
else
set playStatus to "notPlaying"
end if
end tell
tell application "Messages"
if status is available then
if playStatus is "playing" then
if (theArtist as string) is not "Spotify" then
set status message to ("♫ Playing in Spotify: " & (theArtist as string) & " - " & (theName as string))
end if
else
set status message to "Available"
end if
end if
end tell
return 5
end idle
Basically, it checks every 5 seconds to see which track is playing and posts it to your available status on Messages. If Spotify is paused, it changes it back to "Available".
If this is not the correct forum to post this, please kindly redirect me
Enjoy!