What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Help with Timer (AddTimer)

Help with Timer (AddTimer)
Author: Message:
pedro_cesar
Junior Member
**

Avatar

Posts: 61
36 / Male / –
Joined: Dec 2006
Status: Away
O.P. Help with Timer (AddTimer)
how can I make "function _clone (ChatWnd) {}" execute itself every 5 seconds after I write the command "/cloneR" and until I write "/unclone".

P.S. The timer is on Line 51. I added a comment so u see it easier.

var old_DP = "N/A";
var old_NN = "N/A";
var old_PM = "N/A";

function backup () {

    old_DP = Messenger.MyDisplayPicture;
    old_NN = Messenger.MyName;
    old_PM = Messenger.MyPersonalMessage;
}

function _clone (ChatWnd) {

    var e = new Enumerator(ChatWnd.Contacts);
    var Cnt = e.item();

    Messenger.MyName = Cnt.Name;
    Messenger.MyDisplayPicture = Cnt.DisplayPicture;
    Messenger.MyPersonalMessage = Cnt.PersonalMessage;
   
    dp_toast (Cnt.Email);
}

function OnEvent_Timer (checker) {
   
    _clone (ChatWnd);

}

function dp_toast (whois) {
   
    whois = MsgPlus.RemoveFormatCodes(whois);
    whois = "You've become " + whois;
    MsgPlus.DisplayToast ("Script Stared", whois);
}

function OnEvent_ChatWndSendMessage (ChatWnd, Message) {

       
    if (Message == "/clone") {

        _clone (ChatWnd);
       
        return '';
    }
   
    if (Message == "/cloneR") {
       
        _clone (ChatWnd);
           
        MsgPlus.AddTimer("checker", 5000);             // Linea 51
           
        return '';
    }

    if (Message == "/unclone") {
   
        Messenger.MyName = old_NN;
        Messenger.MyDisplayPicture = old_DP;
        Messenger.MyPersonalMessage = old_PM;
       
        dp_toast ("Yourself");
   
    return '';
    }
   
   
    if (Message == "/backup") {
   
        backup ();
       
    return '';
    }


function OnGetScriptCommands() {
    var ScriptCommands = '<ScriptCommands>';
        ScriptCommands    +=     '<Command>';
        ScriptCommands    +=         '<Name>clone</Name>';
        ScriptCommands    +=         '<Description>Clones Active CntWnd</Description>';
        ScriptCommands    +=     '</Command>';
        ScriptCommands    +=     '<Command>';
        ScriptCommands    +=         '<Name>cloneR</Name>';
        ScriptCommands    +=         '<Description>Clones Active CntWnd recursevely after 5 seconds</Description>';
        ScriptCommands    +=     '</Command>';
        ScriptCommands    +=     '<Command>';
        ScriptCommands    +=         '<Name>unclone</Name>';
        ScriptCommands    +=         '<Description>Roll back the cloning</Description>';
        ScriptCommands    +=     '</Command>';
        ScriptCommands    +=     '<Command>';
        ScriptCommands    +=         '<Name>swnick</Name>';
        ScriptCommands    +=         '<Description>Switches the current nick</Description>';
        ScriptCommands    +=     '</Command>';
        ScriptCommands    +=     '<Command>';
        ScriptCommands    +=         '<Name>backup</Name>';
        ScriptCommands    +=         '<Description>Stores Your Info so you can roll back</Description>';
        ScriptCommands    +=     '</Command>';
        ScriptCommands    +=     '<Command>';
        ScriptCommands    += '</ScriptCommands>';

    return ScriptCommands;
}
01-12-2007 07:48 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help with Timer (AddTimer) - by pedro_cesar on 01-12-2007 at 07:48 PM
RE: Help with Timer (AddTimer) - by What? on 01-12-2007 at 07:58 PM
RE: Help with Timer (AddTimer) - by Matti on 01-12-2007 at 08:05 PM
RE: Help with Timer (AddTimer) - by pedro_cesar on 01-12-2007 at 08:21 PM
RE: Help with Timer (AddTimer) - by CookieRevised on 01-12-2007 at 08:43 PM
RE: Help with Timer (AddTimer) - by pedro_cesar on 01-12-2007 at 09:10 PM
RE: Help with Timer (AddTimer) - by CookieRevised on 01-17-2007 at 08:50 AM
RE: Help with Timer (AddTimer) - by pedro_cesar on 01-18-2007 at 11:11 PM
RE: Help with Timer (AddTimer) - by Matti on 01-19-2007 at 07:29 PM
RE: Help with Timer (AddTimer) - by pedro_cesar on 01-19-2007 at 11:09 PM


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