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:
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
36 / Male / Flag
Joined: Mar 2004
RE: Multiple Function Call/callbacks
quote:
Originally posted by markee
quote:
Originally posted by -dt-
er just check for it on received message

code:
function OnEvent_ChatWndReceiveMessage (wnd, origin, msg){

switch(msg){
case "!xxx" : wnd.SendMessage(AzureusInfoFetch()); break;
}


}



(the function name may be incorrect, since I'm unable to download the scripting docs here :( )
That is very silly as the only way it will work (due to async) is to freeze messenger while it gets it :dodgy:
:P
:P it was just a quickly written example, I assumed that all he wanted to know was how to have data sent back when someone says !xxx. ;o but it seems now that I misread his post, and he wanted to know how to send the message from the callback ;o

code:

function AzureusInfoFetch(wnd)
{
http = new ActiveXObject("Microsoft.XMLHTTP");
http.onreadystatechange=function(){
if ((http.readyState == 4) && (http.status == 200))
{
var Azureus = AzureusInfo(http.responseText);
wnd.SendMessage(Azureus);
}
http.close();

}
http.open("GET", "http://" + "192.168.0.2" + ":" + "6885/index.tmpl", true, "StevieD", "lolpassword");
http.send(null);
}



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");
.....
}


function OnEvent_ChatWndReceiveMessage (wnd, origin, msg){

switch(msg){
case "!xxx" : AzureusInfoFetch(wnd); break;
}


}


that should work ;o


This post was edited on 11-30-2007 at 05:29 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
11-30-2007 03:37 AM
Profile 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