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 ""; }
}
}