What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Need help

Need help
Author: Message:
Kroko
New Member
*


Posts: 3
Joined: Aug 2006
O.P. Need help
Hello.

I need help to my script.
The script should take the name from the person i chat with.

my code:
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){

if(Message=="/tagnavn"){

var CntNm = Cnt.Name;

Messenger.MyName = CntNm;
return '';
}


But its only says that the commando not exsist when i press /tagnavn.

Pls help.
08-20-2006 10:44 AM
Profile E-Mail PM Find Quote Report
SnuZZer
Full Member
***

Avatar

Posts: 114
32 / Male / Flag
Joined: Jun 2006
RE: Need help
Hi.
That's because Messenger Plus! can't find the commando "/tagnavn" in the commando menu.

code:
function OnGetScriptCommands()
{
    var kommandoer = "<ScriptCommands>";
    kommandoer += "<Command>";
    kommandoer += "<Name>tagnavn</Name>";
    kommandoer += "<Description>Stjæler kontakts navn.</Description>";
    kommandoer += "</Command>";
    kommandoer += "</ScriptCommands>";
    return kommandoer;
}
08-20-2006 10:49 AM
Profile E-Mail PM Web Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: Need help
quote:
Originally posted by Kroko
But its only says that the commando not exsist when i press /tagnavn.

"{" isn't there for fun...
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
08-20-2006 10:52 AM
Profile PM Web Find Quote Report
mickael9
Full Member
***


Posts: 117
Reputation: 3
33 / Male / Flag
Joined: Jul 2005
RE: Need help
quote:
Originally posted by Kroko
Hello.

I need help to my script.
The script should take the name from the person i chat with.

my code:
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){

if(Message=="/tagnavn"){

var CntNm = Cnt.Name;

Messenger.MyName = CntNm;
return '';
}



But its only says that the commando not exsist when i press /tagnavn.

Pls help.

Hi,
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message)
{
    if(Message=="/tagnavn")
    {
        var e     = new Enumerator(ChatWnd.Contacts);
        var Cnt   = e.item(); // Take the first contact
       
        var CntNm = Cnt.Name;
       
        Messenger.MyName = CntNm;
        return '';
    }
} // Missing bracket


function OnGetScriptCommands()
{
    var cmds    = "<ScriptCommands>";
    cmds            += "<Command>";
    cmds                += "<Name>tagnavn</Name>";
    cmds                += "<Description>Steal contact name</Description>";
    cmds            += "</Command>";
    cmds       += "</ScriptCommands>";
    return cmds;
}

:D

This post was edited on 08-20-2006 at 10:57 AM by mickael9.
08-20-2006 10:53 AM
Profile PM Web Find Quote Report
« 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