Created
November 28, 2009 02:42
-
-
Save crcx/244351 to your computer and use it in GitHub Desktop.
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 run | |
set info to "Nothing Playing!" | |
tell application "System Events" | |
set num to count (every process whose name is "PandoraBoy") | |
end tell | |
if num > 0 then | |
tell application "PandoraBoy" | |
if player state is playing then | |
set who to artist of current track | |
set what to name of current track | |
set onwhat to album of current track | |
set info to quote & what & quote & return & who & return & onwhat | |
end if | |
end tell | |
end if | |
tell application "System Events" | |
set num to count (every process whose name is "iTunes") | |
end tell | |
if num > 0 then | |
tell application "iTunes" | |
if player state is playing then | |
set who to artist of current track | |
set what to name of current track | |
set onwhat to album of current track | |
set stars to (rating of current track) / 20 as integer | |
set info to quote & what & quote & return & who & return & onwhat | |
end if | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment