Last active
October 7, 2015 04:28
-
-
Save cbuck/3106261 to your computer and use it in GitHub Desktop.
Get current song from Rdio app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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