What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed

[REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed
code:
/*
*
*    BBC song from RSS
*    matty
*
*/

var sPsm;

function OnEvent_Initialize() {
    if (Messenger.MyStatus < STATUS_INVISIBLE) return false;
    MsgPlus.AddTimer('grabSong', 60000); // one minute
}


function createXml(url) {
    Interop.Call('wininet.dll', 'DeleteUrlCacheEntryW', url);
    xml = new ActiveXObject('Microsoft.XMLDOM');
    xml.async = true;
   
    xml.load(url);
    return xml;
}

function OnEvent_Timer() {
    var xml = createXml('http://bbc-hackday.dyndns.org/tracks/radio1.rss');
   
    xml.onreadystatechange=function() {
        if (xml.readyState === 4)
            var newPsm = xml.selectSingleNode('//rss/channel/item/dc:creator').text+' - '+xml.selectSingleNode('//rss/channel/item/dc:title').text;
            Debug.Trace(newPsm);
            if (sPsm !== newPsm) {
                Messenger.MyPersonalMessage = newPsm;
                sPsm = newPsm;
            }
        xml = null;
    }
    MsgPlus.AddTimer('grabSong', 60000); // one minute
}
02-11-2008 06:38 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed - by webbo04 on 02-11-2008 at 04:17 PM
RE: [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed - by Spunky on 02-11-2008 at 04:29 PM
RE: [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed - by webbo04 on 02-11-2008 at 04:35 PM
RE: [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed - by MeEtc on 02-11-2008 at 05:06 PM
RE: [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed - by Stigmata on 02-11-2008 at 06:07 PM
RE: [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed - by Spunky on 02-11-2008 at 06:32 PM
RE: [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed - by matty on 02-11-2008 at 06:38 PM
RE: [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed - by webbo04 on 02-11-2008 at 07:06 PM
RE: [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed - by matty on 02-11-2008 at 07:40 PM
RE: [REQ] BBC Radio 1 Now Playing Script. Simple Rss Feed - by Matti on 02-11-2008 at 08:32 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On