Now Playing script for Textual that works for both online radio streams and music library.
|set nowPlaying to "I'm not currently playing anything."|
|if isRunning("iTunes") then|
|tell application "iTunes"|
|if player state is playing then|
|if current stream title is not missing value then|
|set nowPlaying to "/me is currently listening to '" & current stream title & "' on " & name of current track & "."|
|set nowPlaying to "/me is currently listening to '" & name of current track & "' by " & artist of current track & " from '" & album of current track & "'."|
|tell application "System Events"|
|tell application "System Events" to return exists (processes where name is mediaPlayer)|
The Application Support folder path doesn't work any more. As per the wiki, the correct path is...
Also, the /me is verbally outputted to the channel now, instead of being sent as an action. So I changed it to just "Listening to...".