Shoutbox

Calling media with a script results in a strange value - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Calling media with a script results in a strange value (/showthread.php?tid=61633)

Calling media with a script results in a strange value by Scott on 06-26-2006 at 07:21 PM

I've made this script:

code:
function OnEvent_ContactMediaChange (email, new_media) {
   
    contact = Messenger.MyContacts.GetContact(email);
    name = contact.Name;
    new_media = MsgPlus.RemoveFormatCodes(new_media);
   
    Debug.Trace(name + 'changed media to ' + new_media);
}


It works, however, when a contact changes his media, a string like this is written to the debugger window:

Winamp\0Music\01\0{0} - {1}\0Side Liife\0Rt.\0\0\0

Somebody on IRC already told me this is the raw data, but I'd like to know how to parse this raw data so it only results in Title - Artist.

Does anybody know how to do this ?