What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » My First Script, some problems

My First Script, some problems
Author: Message:
Xat
New Member
*

Avatar

Posts: 13
– / Male / Flag
Joined: Jan 2008
O.P. My First Script, some problems
Hi !

I want make a script, but I haven't knowledge on JS scripting...

What my script must do normally :
  • When I type a command, send a message
  • these commands run only if the beginning of the mail adress of my contct is "XXX" (for example)

If someone can help me... Here's what I did :
code:
function OnGetScriptCommands()
{
    var commands = '<ScriptCommands>';
        commands+='<Command>';
            commands+='<Name>command1</Name>';
            commands+='<Description>cmd1.</Description>';
            commands+='<Parameters/>';
        commands+='</Command>';
        commands+='<Command>';
            commands+='<Name>command2</Name>';
            commands+='<Description>cmd2.</Description>';
            commands+='<Parameters/>';
        commands+='</Command>';
    commands+='</ScriptCommands>';
    return commands;
}


function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if (Message=="/command1")
{
            chat_window.SendMessage("command1");
            return "";
    }
    else
    {
    if (Message=="/command2")
    {
            chat_window.SendMessage("command2");
            return ""; }   
            }
            }
10-28-2008 04:14 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
My First Script, some problems - by Xat on 10-28-2008 at 04:14 PM
RE: My First Script, some problems - by matty on 10-28-2008 at 04:52 PM
RE: My First Script, some problems - by MeEtc on 10-28-2008 at 05:20 PM


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