What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Debug needed] Delay Script

[Debug needed] Delay Script
Author: Message:
Dhaya
Junior Member
**

Avatar
lala~

Posts: 25
Reputation: 4
38 / Male / –
Joined: Jul 2006
RE: [Debug needed] Delay Script
first, you'll have to place the OnEvent_Timer() function out of this condition and out of this function.

then, you should do some verifications before your operations. for example if you don't type something with the right format (which is blabla;blabla;blabla) the script will trigger errors when you send Messages.

try this
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];

    if (stringCommand == "#Delay")
    {

      MsgPlus.AddTimer("timerDelay",variableDelay);
      return "";
    }
  }
}

function OnEvent_Timer(TimerId)
{
  if (TimerId == "timerDelay") WndRepeat.SendMessage(strMessage);
}


well, i'm not sure about the regular expression and i'm too lazy to test it. Test and modify this thing if needed :p

This post was edited on 07-07-2006 at 10:16 PM by Dhaya.
Godamn JScript ! I HATE you ! ... but I love you so much <3
07-07-2006 10:14 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Debug needed] Delay Script - by kjfk on 07-07-2006 at 10:04 PM
RE: [Debug needed] Delay Script - by Dhaya on 07-07-2006 at 10:14 PM
RE: [Debug needed] Delay Script - by kjfk on 07-07-2006 at 10:29 PM
RE: [Debug needed] Delay Script - by J-Thread on 07-07-2006 at 10:57 PM
RE: [Debug needed] Delay Script - by kjfk on 07-07-2006 at 11:03 PM
RE: [Debug needed] Delay Script - by kjfk on 07-12-2006 at 08:31 AM
RE: [Debug needed] Delay Script - by mickael9 on 07-12-2006 at 10:42 AM
RE: [Debug needed] Delay Script - by kjfk on 07-12-2006 at 11:12 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On