Shoutbox

question - plugin - 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: question - plugin (/showthread.php?tid=79626)

question - plugin by bramvandeperre on 12-04-2007 at 04:48 PM

hi,

because mynetx is making LCheck, i don't know anything about scripting in messenger plus.

i wanted to have a script that changes your PSM to the content of http://lendetta.be/extest.php ..

can someone make it for me :$ ?

just this, no additional functions like the abillity to turn it off..


already thanks,

Bram


RE: question - plugin by Matti on 12-04-2007 at 05:40 PM

Use the Microsoft.XMLHTTP object! :D I think you can find enough examples of how to use the XMLHTTP object on these forums, and if you're having trouble with it, feel free to ask here! ;)


RE: question - plugin by bramvandeperre on 12-04-2007 at 05:46 PM

yes.. i know i had to use xml.http requests, but, i don't know how..


RE: question - plugin by davidpolitis on 12-05-2007 at 11:44 AM

Here you go, hope it helps ;)

code:
function OnGetScriptMenu(Location)
{
    Menu = '<ScriptMenu>';
    Menu += '<MenuEntry Id="Update">Update PSM</MenuEntry>';
    Menu += '</ScriptMenu>';
    return Menu;
}

function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd)
{
    if (MenuItemId == "Update")
    {
        var Url = "http://lendetta.be/extest.php";
        var XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
   
        XMLHTTP.open("GET", Url, true);
   
        XMLHTTP.onreadystatechange =
        function()
        {
              if (XMLHTTP.readyState == 4 && XMLHTTP.status == 200)
              {
                    var HTML = XMLHTTP.responseText;
                   
                    if (HTML.length < 129)
                        Messenger.MyPersonalMessage = HTML;
                    else
                    MsgPlus.DisplayToast("LCheck2PSM", Url + " returned a longer length than what is allowed as a PSM!");
                }
        }
        XMLHTTP.send(null);
    }
}

RE: question - plugin by mynetx on 12-05-2007 at 12:02 PM

Bram, you could say that you don't need the code anymore, because others are thinking about solutions for you, as you can see.


RE: question - plugin by bramvandeperre on 12-08-2007 at 10:02 PM

yes indeed, thanks but, i have (thanks to mynetx again) a script that auto-checks every 10 minutes, with a PSM lock etc..