What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [release] whos online toast

[release] whos online toast
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [request] whos online toast
Well, each toast can have 4 lines, so if you put the title as "Online Contacts", you should be able to iterate through the online contacts and display 4 people in each box. The only problem is, you'd need to find out the total number of online contacts and then make sure there are enough toasts for each user...

I've got an idea so I'm gonna go away and try it.

*goes away and tries it*

UPDATE:
code:
function OnEvent_SigninReady(){
Debug.DebuggingWindowVisible = true;
var myArray = new Array
var Contacts = Messenger.MyContacts;
var e = new Enumerator(Contacts);
for(; !e.atEnd(); e.moveNext()){
var Contact = e.item();
if(Contact.Status!=1){
newItem = myArray.length;
myArray[newItem] = MsgPlus.RemoveFormatCodes(Contact.Name);
}
}

for(var i=0;i<350;i++){
if(myArray[i]==undefined){
myArray[i]="";
}
if(myArray[i].length>=25){
myArray[i] = (myArray[i].substr(0,25)+"...");
}
}
MsgPlus.DisplayToast("Online Contacts"," "+myArray[0]+"\n "+myArray[1]+"\n "+myArray[2]+"\n "+myArray[3]);
if(myArray[4]!=""){
MsgPlus.DisplayToast("Online Contacts"," "+myArray[4]+"\n "+myArray[5]+"\n "+myArray[6]+"\n "+myArray[7]);
}
if(myArray[8]!=""){
MsgPlus.DisplayToast("Online Contacts"," "+myArray[8]+"\n "+myArray[9]+"\n "+myArray[10]+"\n "+myArray[11]);
}
if(myArray[12]!=""){
MsgPlus.DisplayToast("Online Contacts"," "+myArray[12]+"\n "+myArray[13]+"\n "+myArray[14]+"\n "+myArray[15]);
}
if(myArray[16]!=""){
MsgPlus.DisplayToast("Online Contacts"," "+myArray[16]+"\n "+myArray[17]+"\n "+myArray[18]+"\n "+myArray[19]);
}
}



Displays upto 20 online contacts (I can neaten up the if statements into a function to add even more people :p) and currently checks 350 contacts. I didnt think too many people would have more than that. Can't get the text to change green for some reason... Maybe someone else could put that in?

To be honest, it looks quite a short simple script, but it still took me a while because this is my first time using arrays in JScript :|

EDIT: Just updated code as it was showing Email not Name and I've now truncated the Name after 25 characters

This post was edited on 08-07-2006 at 05:27 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
08-07-2006 03:57 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[release] whos online toast - by Jiggs on 08-06-2006 at 01:39 PM
RE: [request] whos online toast - by benjyrama on 08-06-2006 at 01:56 PM
RE: [request] whos online toast - by Lukeyy19 on 08-06-2006 at 02:16 PM
RE: [request] whos online toast - by matty on 08-06-2006 at 02:17 PM
RE: [request] whos online toast - by Jimbo on 08-06-2006 at 03:19 PM
RE: [request] whos online toast - by Spunky on 08-06-2006 at 03:24 PM
RE: [request] whos online toast - by Jiggs on 08-06-2006 at 05:35 PM
RE: [request] whos online toast - by Spunky on 08-07-2006 at 03:57 PM
RE: [request] whos online toast - by Jiggs on 08-07-2006 at 05:40 PM
RE: [request] whos online toast - by Intosia on 08-07-2006 at 05:44 PM
RE: [request] whos online toast - by Spunky on 08-07-2006 at 05:46 PM
RE: [request] whos online toast - by Jiggs on 08-07-2006 at 05:48 PM
RE: [request] whos online toast - by Intosia on 08-07-2006 at 05:49 PM
RE: [request] whos online toast - by Jiggs on 08-07-2006 at 05:51 PM
RE: [request] whos online toast - by Spunky on 08-07-2006 at 05:52 PM
RE: RE: [request] whos online toast - by Jiggs on 08-07-2006 at 05:57 PM
RE: [request] whos online toast - by Jiggs on 08-07-2006 at 05:55 PM
RE: [request] whos online toast - by Spunky on 08-07-2006 at 05:56 PM
RE: [request] whos online toast - by Jiggs on 08-08-2006 at 01:55 AM
RE: [release] whos online toast - by Spunky on 08-08-2006 at 05:15 PM
RE: [release] whos online toast - by Jiggs on 08-08-2006 at 10:20 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