For a timer, you need to first create one:
code:
MsgPlus.AddTimer(/* TIMERID */ "MyTimer", /* ELAPSE (in ms) */ 100);
and have an event for it:
code:
function OnEvent_Timer(TimerId) {
switch(TimerId) {
case "MyTimer":
/* Do stuff here */
MsgPlus.AddTimer("MyTimer", 100); //Optionally, you can create a loop by re-adding the timer
break;
}
}
Of course, you can have multiple timers, like "MyTimer" and "MyOtherTimer". To make those work, call MsgPlus.AddTimer whenever you want for one of them and add a "case"-statement to the "switch"-block in the OnEvent_Timer function.