What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » help me fix my script please

help me fix my script please
Author: Message:
Silentdragon
Full Member
***

Avatar
if(life==null && wrists) EmoAlert();

Posts: 148
Reputation: 2
34 / Male / –
Joined: Jun 2006
RE: help me fix my script please
Yeah..I got carried away, but you should be able to tell whats changed.
code:
var TheFile = MsgPlus.ScriptFilesPath + "\\log.txt";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

function OnEvent_Initialize(MessengerStart) {
    getData();
}
function checkDupe(datum) {
    if(fso.FileExists(TheFile)) {
        var a = fso.OpenTextFile(TheFile, 1);
        var text = a.ReadAll();
        text = text.split('\r\n');
        for(var i = 0;i<text.length;i++)
            if(text[i] == datum) {
                a.Close();
                return true;
            }
        a.Close();
        return false;
    }
}
function logging(datum) {
    if(fso.FileExists(TheFile)) {
            if(checkDupe(datum))
                return;
            a = fso.OpenTextFile(TheFile, 8);
    } else
        var a = fso.OpenTextFile(TheFile,2,true);
    a.WriteLine(datum);
    a.Close();
}

function getData() {
    xmlhttp.open("GET", "http://shoutbox.menthix.net/forumdisplay.php?fid=39", true);
    xmlhttp.onreadystatechange = stateChanged;
    xmlhttp.send(null);
}

function stateChanged() {
    if (xmlhttp.readyState==4)
        if (xmlhttp.status==200)
               parseIt(xmlhttp.responseText);
}

function parseIt(htmls)
{
    var foo = "";
    var oDoc = new ActiveXObject("htmlfile");
    oDoc.open();
    oDoc.write(htmls);
    oDoc.close();
    var links = oDoc.getElementsByTagName("a");
    for (var i=0; i<links.length; i++) {
        foo = links[i].innerHTML.toLowerCase()
        if (foo.indexOf("[request]") > -1 && !checkDupe(links[i].innerHTML)) {
            MsgPlus.DisplayToast("MsgHelp.net [Request]",links[i].innerHTML,'','OpenSite');
            logging(links[i].innerHTML);
        }
    }
}

function OpenSite() {
    new ActiveXObject('WScript.Shell').run('http://shoutbox.menthix.net/forumdisplay.php?fid=39');
}

function OnEvent_Uninitialize(MessengerExit) {
}
07-14-2006 09:42 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
help me fix my script please - by AberNStein on 07-14-2006 at 12:14 AM
RE: help me fix my script please - by luisillo on 07-14-2006 at 12:27 AM
RE: help me fix my script please - by AberNStein on 07-14-2006 at 01:07 AM
RE: help me fix my script please - by BstrdSmkr on 07-14-2006 at 01:45 AM
RE: help me fix my script please - by AberNStein on 07-14-2006 at 01:57 AM
RE: help me fix my script please - by AberNStein on 07-14-2006 at 09:00 PM
RE: help me fix my script please - by Silentdragon on 07-14-2006 at 09:42 PM
RE: help me fix my script please - by AberNStein on 07-15-2006 at 01:26 AM


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