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
35 / Male / –
Joined: Dec 2006
Status: Away
O.P. RE: Help with Timer (AddTimer)
that's how I wrote it before, but for some reason the status only remained like that for kinda second, and then rolled back to my previous status, so I though I was doing it wrong.

code:
var old_NN = "N/A";
var old_DP = "N/A";
var old_PM = "N/A";
var old_ST = "N/A";
var con_inf= "N/A";

////////////////////////////START BACKUP FUNCTION////////////////////////

function backup () {

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

function OnEvent_SigninReady (Email) { 

    backup ();
}

////////////////////////////END BACKUP FUNCTION////////////////////////

function dpToast (whois) {

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

function _clone (con_inf) {

    var e = new Enumerator (con_inf);
    var Cnt = e.item ();

    Messenger.MyName = Cnt.Name;
    Messenger.MyDisplayPicture = Cnt.DisplayPicture
    Messenger.MyPersonalMessage = Cnt.PersonalMessage;   
    Messenger.MyStatus = Cnt.Status;
}

function OnEvent_Timer (_cloneR) {

    if (_cloneR == "_cloneR") {
      _clone (con_inf);
      MsgPlus.AddTimer("_cloneR", 5000);
    }

}

function OnEvent_ChatWndSendMessage (ChatWnd, Message) {

    if (Message == '/clone') {
   
        con_inf = ChatWnd.Contacts;
        var e = new Enumerator (con_inf);
        var Cnt = e.item ();

        _clone (con_inf);
       
        dpToast (Cnt.Email);
       
    return '';
    }
   
    if (Message == '/cloneR') {
       
        con_inf = ChatWnd.Contacts;
        var e = new Enumerator (con_inf);
        var Cnt = e.item ();
       
        con_inf = ChatWnd.Contacts;
        _clone (con_inf);
        MsgPlus.AddTimer('_cloneR', 5000);
       
        dpToast (Cnt.Email);

    return '';
    }

   
    if (Message == '/unclone') {
   
        MsgPlus.CancelTimer('_cloneR');

        Messenger.MyName = old_NN;
        Messenger.MyDisplayPicture = old_DP;
        Messenger.MyPersonalMessage = old_PM;
        Messenger.MyStatus = old_ST;

        dpToast ("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 recursively</Description>';
        ScriptCommands    +=     '</Command>';
        ScriptCommands    +=     '<Command>';
        ScriptCommands    +=         '<Name>unclone</Name>';
        ScriptCommands    +=         '<Description>Roll back the cloning</Description>';
        ScriptCommands    +=     '</Command>';
        ScriptCommands    +=     '<Command>';
        ScriptCommands    +=         '<Name>backup</Name>';
        ScriptCommands    +=         '<Description>Stores Your Info so you can roll back</Description>';
        ScriptCommands    +=     '</Command>';
        ScriptCommands    += '</ScriptCommands>';

    return ScriptCommands;
}


This post was edited on 01-19-2007 at 11:10 PM by pedro_cesar.
01-19-2007 11:09 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