mickael9
Full Member
Posts: 117 Reputation: 3
33 / /
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;
}
This post was edited on 08-20-2006 at 10:57 AM by mickael9.
|
|