What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Question] Help with code...

[Question] Help with code...
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [Question] Help with code...
code:
var online;
var offline;
var percent;
var str;
var oldPSM;

function OnEvent_SigninReady(Email){
doIt(Email);
}

function OnEvent_ContactSignin(Email){
doIt(Email);
}

function OnEvent_ContactSignout(Email){
doIt(Email);
}

function OnEvent_Initialize(MessengerStart){
doIt(Messenger.MyEmail);
oldPSM = Messenger.MyPersonalMessage
}

function doIt(Email){
str="";
online=0;
offline=0;
var Contacts = Messenger.MyContacts;
var e = new Enumerator(Contacts);
for(; !e.atEnd(); e.moveNext()) {
var Contact = e.item();
if(Contact.Status!=1&&Contact.Status!=0){
online++;
}
offline++;

}
percent = Math.round((online/offline)*100);
for(var i=0;i<percent;i++){
str=str.replace("-","|");
}
for(var a=0;a<=100;a++){
str=str.replace("-","");
}

percent2 = Math.round(100 - percent);
for(var i=0;i<percent;i++){
str=str.replace("-","|");
}
for(var a=0;a<=100;a++){
str=str.replace("-","");
}
str=str+" "+percent+"% dos contatos Online ("+online+"/"+offline+")";
var psm = Messenger.MyPersonalMessage;
Messenger.MyPersonalMessage = oldPSM + " -" + str;
Debug.Trace(Email +" caused PSM to update");
}

This will only show the PSM when the script was started + str though :p

This post was edited on 10-25-2006 at 09:30 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
10-25-2006 09:28 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Question] Help with code... - by MicroWay on 10-24-2006 at 01:20 AM
RE: [Question] Help with code... - by Ezra on 10-24-2006 at 02:38 AM
RE: [Question] Help with code... - by deAd on 10-24-2006 at 02:39 AM
RE: [Question] Help with code... - by matty on 10-24-2006 at 03:15 AM
RE: [Question] Help with code... - by MicroWay on 10-25-2006 at 08:05 PM
RE: [Question] Help with code... - by Spunky on 10-25-2006 at 09:28 PM
RE: RE: [Question] Help with code... - by MicroWay on 10-27-2006 at 12:46 AM
RE: [Question] Help with code... (solved) - by saralk on 10-27-2006 at 10:19 AM
RE: [Question] Help with code... (solved) - by MicroWay on 10-27-2006 at 01:15 PM
RE: [Question] Help with code... (solved) - by Baggins on 10-28-2006 at 12:37 AM
RE: [Question] Help with code... (solved) - by MicroWay on 10-28-2006 at 02:10 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