Hi all, as me being starter in scripting, and most of u being advanced, i think u guys could help me out!
I made a script that checks if the first symbol is "~".
Wich is simple to do by:
code:
if(Message.substring(0,1) == "~") { //do what needs to be done}
And know i want to make a feature to let people change the symbol/word they want the script to listen on. And also more then 1 symbol/point, so is their any option to let the script check the first WORD, in stead of what numbers are inside the (), as in (0,1).
The second question:
The Script autmatically detects the name of the Person you are chatting with.
Wich is did this way:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
if (test == "on")
{
var name = MsgPlus.RemoveFormatCodes(Origin);
if (name == Banned1 || name == Banned2 || name == Banned3 || name == Banned4 || name == Banned5 || name == Messenger.Myname) {
if(Message.substring(0,1) == "~") {
damessage = Message.substring(1,500);
ChatWnd.SendMessage("");
Debug.Trace("Trace it!");
}
} else {
if(Message.substring(0,1) == "~") {
damessage = Message.substring(1,500);
Messenger.MyPersonalMessage = "" + name.substring(0,25) + " says: " + damessage + " - You're message here? put a ~ in front of it!";
ChatWnd.SendMessage("Your auto message" );
Debug.Trace("trace some text");
MsgPlus.DisplayToast("It's a toast!");
}
}
}
}
So is their an option to let him return the contacts E-Mail in stead of his name?
I tried changing "Origin" to "E-Mail" or " Mail" or "Adres" but it didn't work!
Anyone knows how to create this?
~Apex
p.s. If I didn't make myself clear, plz tell me, my english isn't perfect!