Ok this script for spamming text "partially" works, but my issue is after a while (about 10-15 sends) it stops sending anything. If I send something anything manually however, it starts spamming again and still stops later. Here's the script -
code:
function OnEvent_Initialize(MessengerStart)
{
}
var toSpam = "";
var theChat;
function OnEvent_Uninitialize(MessengerExit)
{
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
theChat = ChatWnd;
Commands = Message.split(' ');
switch (Commands[0]) {
case "/spam" :
toSpam = Message.substr(6);
MsgPlus.AddTimer("asd", 200);
return "";
break;
case "/stopspam" :
MsgPlus.CancelTimer("asd");
return "";
break;
}
}
function OnEvent_Timer(TimerId) {
Debug.Trace(theChat.SendMessage(toSpam));
MsgPlus.AddTimer("asd", 200);
}
The Debug.Trace for the SendMessage shows as true even when no message is sent. Could anyone tell me why this (no messages being sent) keeps occurring?