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 ?