Shoutbox

Find and update - 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: Find and update (/showthread.php?tid=68969)

Find and update by SnuZZer on 11-29-2006 at 07:50 PM

Hi.
I'm from Denmark and my english isn't good, but I'll try.
I'm trying to make a log of witch music i hear.
When "What I'm listning to" change it saves the artist, the title and the album name in a XML-document.

A post in the XML-document lookes like this:
0//splitter\\Nik & Jay//splitter\\Rock 'n' roll//splitter\\Nik & Jay

Blue = Hits
Red = Artist
Green = Title
Orange = Album name
Black = "//splitter\\" is there so I can split it when I put it in the LstViewControl.

The meaning is that, when the "What I'm listning to" change and the script saves the information, it shell check if the artist and the title match a post in the XML-document, if it does it shell plus one to hits, if it doesn't it shell add the information.
But I can't find out to do above-mentioned.

This is my save-function:

code:
function Gem(Kunstner, Nummer, Album)
{
    xml.load(Sti);

    var Tilfoej = xml.createElement("Nummer");

    Tilfoej.appendChild(xml.createTextNode("0//splitter\\\\" + Kunstner + "//splitter\\\\" + Nummer + "//splitter\\\\" + Album));
    xml.getElementsByTagName("Musik")[0].appendChild(Tilfoej);
   
    xml.save(Sti);
}

Thanks in advance.