tell application "System Events" if (count (every process whose displayed name is "RealNetworks Rhapsody.app")) > 0 and (count (every process whose displayed name is "Adium.app")) > 0 then my SetMessage() else -- my tellAdiumStatus("") end if end tell on SetMessage() set locDir to "/Users/xxxxx/" -- replace with your temp directory set locFile to "rhapsodyTracks.xml" set xmlUrl to ("http://feeds.rhapsody.com/user-track-history.rss?rhapUserId=xxxxxxxx&userName=I") -- replace with URL to your track history feed -- get RSS do shell script "curl \"" & xmlUrl & "\" -o \"" & locDir & locFile & "\" " set xmlFile to (locDir & locFile) -- get xml data from xml file set xmlData to getData(xmlFile) tell application "System Events" set root to XML element 1 of xmlData set channel to XML element 1 of root set myitem to XML element "item" of channel set artist to value of XML element "rhap:artist" of myitem set album to value of XML element "rhap:album" of myitem set albumid to value of XML element "rhap:album-rcid" of myitem set currtrack to value of XML element "rhap:track" of myitem set link to value of XML element "link" of myitem -- get album link set newlink to "http://www.rhapsody.com/album?albumId=" & albumid set statusMessage to "currently hearing: " & artist & " - " & currtrack & " (listen)" my tellAdiumStatus(statusMessage) end tell tell application "Finder" --try set fileName to locDir & locFile if exists file fileName then display dialog "exists" delete file fileName end if -- end try end tell return statusMessage end SetMessage on tellAdiumStatus(statusMessage) -- display dialog statusMessage tell application "Adium" set my status message to statusMessage end tell end tellAdiumStatus on getData(theFile) set theXmlfile to (POSIX file theFile) as Unicode text tell application "System Events" to return (contents of XML file theXmlfile) end getData