Skip to content

Instantly share code, notes, and snippets.

@cbuck
Last active October 7, 2015 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbuck/3106261 to your computer and use it in GitHub Desktop.
Save cbuck/3106261 to your computer and use it in GitHub Desktop.
Get current song from Rdio app
on ApplicationIsRunning(appName)
tell application "System Events" to set appNameIsRunning to (name of processes) contains "Rdio"
return appNameIsRunning
end ApplicationIsRunning
on np()
if ApplicationIsRunning("Rdio") then
tell application "Rdio"
set track_name to get name of current track
set artist_name to get artist of current track
set album_name to get album of current track
end tell
set status to track_name & " | " & artist_name & " | " & album_name
return track_name
end if
set status to ""
return status
end np
np()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment