What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Multiple Function Call/callbacks

Multiple Function Call/callbacks
Author: Message:
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. Multiple Function Call/callbacks
Hey guys,

I need advice yet again.  I have written a script which checks an html interface and outputs the information scraped to a contact.  Or rather, thats my intention.  I've spent 10 mins trying to write this, but it doesnt make sense even to me, so please excuse the random code.

code:
function AzureusInfoFetch()
{
    http = new ActiveXObject("Microsoft.XMLHTTP");
    http.onreadystatechange=AzureusInfoRead();
    http.open("GET", "http://" + "192.168.0.2" + ":" + "6885/index.tmpl", true, "StevieD", "leroux should edit his password out of scripts he posts on the forums");
    http.send(null);
}
               

function AzureusInfoRead()
{
     if ((http.readyState == 4) && (http.status == 200))
    {
        var Azureus = AzureusInfo(http.responseText);
        Debug.Trace(Azureus);
    }
    http.close;
}

function AzureusInfo(text)
{
    if (text.indexOf('<tr id="r'+n) > -1)
    {
        XBMCArtist = text.substring(text.indexOf('<tr id="r1"'), text.length);
        XBMCArtist = XBMCArtist.substring(0, XBMCArtist.indexOf('</tr>')+5);
    XBMCArtist=XBMCArtist.split("<td");
.....
}

Theres various formatting in this code, and it all works according to debug, but the basic point I need is for it to be called by a contact.  I'm looking for the function AzureusInfoFetch() to be called when a contacts sends the message "!azureus", and then once all of the data is fetched and formatted through the other functions will send it back to the contact.  I don't suppose anyone can suggest a way to do this, because I just dont seem to be able to get my head around it.

Cheers

[Sorry for the misleading topic name earlier.  I got confused while writing and ending up changing what I needed help with.  I wasnn't trying to trick people into viewing. Sorry]

This post was edited on 11-30-2007 at 05:20 AM by ArkaneArkade.
[Image: adsig.jpg]
11-29-2007 12:44 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Multiple Function Call/callbacks - by ArkaneArkade on 11-29-2007 at 12:44 PM
RE: Multiple Function Call/callbacks - by -dt- on 11-30-2007 at 12:30 AM
RE: Multiple Function Call/callbacks - by markee on 11-30-2007 at 03:27 AM
RE: Multiple Function Call/callbacks - by -dt- on 11-30-2007 at 03:37 AM
RE: Multiple Function Call/callbacks - by ArkaneArkade on 11-30-2007 at 10:27 PM
RE: Multiple Function Call/callbacks - by Matti on 12-01-2007 at 09:15 AM
RE: Multiple Function Call/callbacks - by ArkaneArkade on 12-01-2007 at 09:24 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