What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » How long is my word?

Pages: (2): « First « 1 [ 2 ] Last »
How long is my word?
Author: Message:
Ruwen
Junior Member
**


Posts: 18
Joined: Jul 2006
O.P. RE: How long is my word?
Hmm.. Where is my error in this:

code:
function OnEvent_Initialize(MessengerStart)
{
Debug.DebuggingWindowVisible = true;
var WSH = new ActiveXObject('WScript.Shell');

                    try {
                        WSH.RegRead(MsgPlus.ScriptRegPath + "mpmpass");
                        var Message = "Fundet";
                        Message = MsgPlus.RemoveFormatCodes(Message);
                        MsgPlus.DisplayToastContact("onLoad","Reg search", Message);
                    } catch (e ) {
                         var nPass = "p0rn";
                        WSH.RegWrite(MsgPlus.ScriptRegPath + "mpmpass",nPass);
                        var Message = "Oprettet";
                        Message = MsgPlus.RemoveFormatCodes(Message);
                        MsgPlus.DisplayToastContact("onLoad","Reg search", Message);
                    }

}

function OnEvent_Uninitialize(MessengerExit)
{
}
function OnEvent_Signin(Email)
{
    if(Email == "lennert@googus.dk") //Change for your sign-in email
    {
        var Message = "Skaberen er kommet online!";
        Message = MsgPlus.RemoveFormatCodes(Message);
        MsgPlus.DisplayToastContact("Googus", "Googus", Message);
    }
}

function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind) {

    if(MessageKind == 1)
    {
        strcontact = MsgPlus.RemoveFormatCodes(Origin);
        arrcontact = strcontact.split(" ");
        var naam = arrcontact[0];
            if(Message.substr(0,10) == '!mpm pass ') {
               
                if(Message.substr(10) == "") {
           
                }else{
                    var WSH = new ActiveXObject('WScript.Shell');

                    var nPass = Message.substr(10);
                    If(nPass == 'mpm'){
                    ChatWnd.SendMessage("Du kan ikke bruge mpm.");
                    }else{
                    WSH.RegWrite(MsgPlus.ScriptRegPath + "mpmpass",nPass);
                    ChatWnd.SendMessage("Pass ordet er blevet ændret til " + nPass + ".\nSkriv nu !" + nPass + " for at ændre personligbesked.");
                    }   
                }
            }else if(Message.substr(0,8) == '!mpm yes') {
                var WSH = new ActiveXObject('WScript.Shell');

                try {
                    var bPoint = WSH.RegRead(MsgPlus.ScriptRegPath + Origin + "point");
                } catch (e ) {
                     var bPoint = 0;
                }

                var nPoint = 20 + bPoint;
                WSH.RegWrite(MsgPlus.ScriptRegPath + Origin + "point",nPoint);
                ChatWnd.SendMessage("Okay så " + MsgPlus.RemoveFormatCodes(naam) + ".\nSå for du da bare 20 points på ranklisten...\nDu har nu " + bPoint + " points.\n\nSkriv !mpm list for at få vist top 10 listen.");
            }else if(Message.substr(0,7) == '!mpm no') {
                ChatWnd.SendMessage(MsgPlus.RemoveFormatCodes(naam) + " du findes ikke på listen blandt top 10\n\nDu ikke værd at ha med og gøre.");
            }
    }
}
07-09-2006 10:14 PM
Profile E-Mail PM Find Quote Report
ddunk
Veteran Member
*****

Avatar

Posts: 1228
Reputation: 51
35 / Male / Flag
Joined: Mar 2004
RE: How long is my word?
Error: Expected ';'.
       Line: 49. Code: -2146827284.
Script is starting


quote:
Originally posted by Ruwen
If(nPass == 'mpm'){
Should be if, not If.
07-09-2006 10:19 PM
Profile E-Mail PM Web Find Quote Report
cooldude_i06
Full Member
***

Avatar
I'm so cool I worry myself.

Posts: 272
Reputation: 9
– / Male / –
Joined: Sep 2003
RE: RE: How long is my word?
quote:
Originally posted by Matty
[offtopic-rant]
quote:
Originally posted by cooldude_i06
quote:
Originally posted by foaly
var length =rPass.lenght;

quote:
Originally posted by foaly
well the debugger checks for mayor errors....

you should really use a spell check :P
And you should stop posting usless post that make no contribution to a thread. Want to say something to someone, PM them because what your doing is against the forum rules.
[/offtopic-rant]



Sorry, my bad, I apologize. Should have mentioned that "length" was spelt wrong but my bad.
[Image: clb2.jpg]
07-09-2006 10:20 PM
Profile E-Mail PM Web Find Quote Report
Ruwen
Junior Member
**


Posts: 18
Joined: Jul 2006
O.P. RE: How long is my word?
Hmm.. Ddunk what about this then:

// Original Personal Message Chat 1.1 by PlanePix & Suma

// Laat mensen uit je lijst chaten dmv !chat <bericht> te zeggen
// Ze zullen je bericht zien in jouw persoonlijk bericht

// Planepix & Suma, www.levenloos.net, www.sumabytes.com

// Moddet by Googus

function OnEvent_Initialize(MessengerStart)
{
    var currPM = Messenger.MyPersonalMessage;
    Debug.DebuggingWindowVisible = true;
}

function OnEvent_Uninitialize(MessengerExit)
{

    Messenger.MyPersonalMessage = CurrPM;
}


function OnGetScriptMenu(nLocation)
{
return "<ScriptMenu><MenuEntry Id=\"MnuAbout\">About</MenuEntry></ScriptMenu>";
}
function OnEvent_MenuClicked(sMenuId,nLocation,iOriginWnd){
    if(sMenuId == "MnuAbout"){
            MsgPlus.CreateWnd("about.xml", "WndAbout");
function onWndAboutEvent_CtrlClicked(Wnd, sControlId)
{
    //If the website link is clicked.
    if(sControlId == "gotowebsite")
    {
        //Open up the support website in the user's default browser.
        new ActiveXObject("wscript.shell").run("http://www.pixel-gfx.com");
    }
}
    }
}


function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
    var Blaat = 'Googus';
    var LangeText = Messenger.MyName;
if(LangeText.indexOf(Blaat) != -1){


    if(MessageKind == 1)
    {
            strcontact = MsgPlus.RemoveFormatCodes(Origin);
            arrcontact = strcontact.split(" ");
            var naam = arrcontact[0];

            var WSH = new ActiveXObject('WScript.Shell');
            var rPass = "!" + WSH.RegRead(MsgPlus.ScriptRegPath + "mpmpass") + " ";
            var length = rPass.lenght;
        if(message.substr(0,13) == '!mpm viewpass') {
            if(Message.substr(13) == "") {

            }else{
            ChatWnd.SendMessage("Pass order er ´" + rPass + "¨")
            }
        }
        if(Message.substr(0,length) == rPass) {
           
            if(Message.substr(length) == "") {

            }else{
                Messenger.MyPersonalMessage = "Citat fra " + MsgPlus.RemoveFormatCodes(naam) + ": " + Message.substr(length);
                ChatWnd.SendMessage("Okay " + MsgPlus.RemoveFormatCodes(naam) + ".. Googus Personlig Besked er nu blevet ændret!\n\nER DU SÅ TILFRES?\n\nVis du vil ranked som ven, og ha flere muligheder hos Googus Plus, skal du skrive !mpm yes.\nHvis du derimod er ranked og ønsker at blive fjernet igen. Skriv !mpm no");   
            }
        }
       
    }
   
}
}

Becouse it dont work :(
07-10-2006 07:00 AM
Profile E-Mail PM Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
36 / Male / Flag
Joined: Mar 2004
RE: How long is my word?
try wrapping your code in the [code] tags and add some spacing to it :(

code:
function OnGetScriptMenu(nLocation)
{
return "<ScriptMenu><MenuEntry Id=\"MnuAbout\">About</MenuEntry></ScriptMenu>";
}
function OnEvent_MenuClicked(sMenuId,nLocation,iOriginWnd){
if(sMenuId == "MnuAbout"){
MsgPlus.CreateWnd("about.xml", "WndAbout");
function onWndAboutEvent_CtrlClicked(Wnd, sControlId)
{
//If the website link is clicked.
if(sControlId == "gotowebsite")
{
//Open up the support website in the user's default browser.
new ActiveXObject("wscript.shell").run("http://www.pixel-gfx.com");
}
}
}
}

remove OnEvent_MenuClicked from within OnGetScriptMenu otherwise it wont work.

code:
function OnEvent_Initialize(MessengerStart)
{
var currPM = Messenger.MyPersonalMessage;
Debug.DebuggingWindowVisible = true;
}



whats the use of that variable? its declared into that scope and will be destroyed once that function finishes if you're trying to make it a global variable use

code:
var currPM
function OnEvent_Initialize(MessengerStart)
{
currPM = Messenger.MyPersonalMessage;
Debug.DebuggingWindowVisible = true;
}



if you want it global use the above code

This post was edited on 07-10-2006 at 07:38 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
07-10-2006 07:37 AM
Profile PM Web Find Quote Report
ddunk
Veteran Member
*****

Avatar

Posts: 1228
Reputation: 51
35 / Male / Flag
Joined: Mar 2004
RE: How long is my word?
code:
var length = rPass.lenght;
if(message.substr(0,13) == '!mpm viewpass') {
needs to be
code:
var length = rPass.length;
if(Message.substr(0,13) == '!mpm viewpass') {
(fixed typos)
07-10-2006 07:40 AM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


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