What i have now...
code:
var WndRepeat = new ChatWnd(); // used to store the ChatWnd
var strMessage = "";
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)
{
if (sMessage.match(/^#.+;.+;.+/))
{
var arrayMessage = sMessage.split(";");
var stringCommand = arrayMessage[0];
var variableDelay = arrayMessage[1];
strMessage = arrayMessage[2];
WndRepeat = ChatWnd;
if (stringCommand == "#Delay")
{
MsgPlus.AddTimer("timerDelay",variableDelay);
return "";
}
}
}
function OnEvent_Timer(TimerId)
{
if (TimerId == "timerDelay") WndRepeat.SendMessage(strMessage);
}
the outcome when i type "#Delay;2000;2 sec delay":
the messenger sends "#Delay;2000;2 sec delay"
also tried doing "var strMessage = arrayMessage[2];" since im new and dont really know if it should be with or without "var".. but it is the same outcome