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

Pages: (5): « First « 1 2 [ 3 ] 4 5 » Last »
[release] Who's online
Author: Message:
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: [release] Who's online
could someone make a configuration window for my script so that people can change the color of the text in the toasts and also so they can change the amount of time that it re-displays the toasts?
08-29-2006 10:35 AM
Profile E-Mail PM Find Quote Report
Zeh
Full Member
***

Avatar
DC 4 EVER!

Posts: 136
Reputation: 1
36 / Male / –
Joined: Aug 2006
RE: [release] Who's online
Maybe alexp2_ad knows how to do it.
[Image: Zeh.png][Image: x copy.jpg]
| Windows Live Messenger Beta Tester | Windows Live Mail Beta Tester |
08-29-2006 12:44 PM
Profile E-Mail PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: [release] Who's online
i hope so, because i think with the configuration window, the script will be a huge success
08-29-2006 06:41 PM
Profile E-Mail PM Find Quote Report
dylan!
Senior Member
****

Avatar
l33t p4int3r

Posts: 665
Reputation: 30
– / Male / Flag
Joined: Jan 2005
RE: [release] Who's online
quote:
Originally posted by 134jimbodude's first post
I did not make this script
quote:
Originally posted by your siggy
My script: Who's online?

stealing otehrs work?:S taking credit for it? that just doesn't add up :undecided:
08-29-2006 07:11 PM
Profile E-Mail PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: [release] Who's online
add up now?
lol


So, can someone make a configuration window for this or not?, i would be so happy if someone would.
09-01-2006 08:44 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: RE: [release] Who's online
quote:
Originally posted by alexp2_ad
quote:
Originally posted by Zeh
LOL ok. But isn't there any way of putting each of them in a diferent line with colors? Even if it would take a more complecated code?
No.

Actually, patchou should make a function for a toast that line wraps and uses colours... *-)
Use the newline character like you can in every other string in JScript:

\n

and if that doesn't work try to use:

\x0D

and if that doesn't work, slap Patchou :p

EDIT: and it doesn't work, so let us slap Patchou...



quote:
Originally posted by SpunkyLoveMuff
ALT codes don't seem to go into the script very well (It'd be ALT+0015 for carriage return).
ALT+0015 is certainly not a carriage return. The decimal ascii for a CR is 13 (and thus 0x0D in hexadecimal, see above)...





------------------------------------------

about alexp2_ad's code the code alexp2_ad posted (which isn't his!... ;)@alex):

optimized:
code:
function OnEvent_SigninReady(sEmail) {
    var online = 0;
    var offline = 0;
    for (var e = new Enumerator(Messenger.MyContacts); !e.atEnd(); e.moveNext()) {
        if (e.item().Status > 1) { online++; } else { offline++; }
    }
    MsgPlus.DisplayToastContact('Contact Counter', '[c=green]Online: ' + online + '[/c]\n[c=red]Offline: ' + offline + '[/c]', 'Next count in ' + TimeLength(mytime));
    MsgPlus.AddTimer('reload', mytime) //Replace with SixtyMins if you want an hour
}


function OnEvent_Timer(sTimerId) {
    if (Messenger.MyStatus != 0) {
        OnEvent_SigninReady(Messenger.MyEmail);
    }
}
Extremely important note:

Each and every script that uses timers to manipulate or check user specific stuff should first check if the same user is still signed in when the timer triggers!!!

It should check if it is still the same current user who is signed in and thus only perform the action if the user is the same as the one who started the timer.

Failing todo all this will cause many errors when:
- the user signs out when a timer is still active
- a new user signs in and the action when the timer triggers is something like blocking a contact, changing status, retrieving contacts, etc...

All this because timers do not reset and aren't deleted when somebody signs out or when somebody else signs in.



For this particular script above, the check to see if it is still the current user who started the timer, isn't needed since the SigninReady() event function is used, but every developer should be aware of the above pitfalls.
Extremely many scripts make these faults...

Another, and even better solution for the above problem (for this particular script!) is to explicitly delete the timer when the user signs out:

code:
function OnEvent_SignOut(sTimerId) {
    MsgPlus.DeleteTimer('reload');
}
function OnEvent_Timer(sTimerId) {
    OnEvent_SigninReady(Messenger.MyEmail);
}

This post was edited on 09-15-2006 at 11:22 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-01-2006 09:36 AM
Profile PM Find Quote Report
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
37 / Male / –
Joined: May 2004
Status: Away
RE: RE: RE: RE: [release] Who's online
quote:
Originally posted by CookieRevised
quote:
Originally posted by alexp2_ad
Actually, patchou should make a function for a toast that line wraps and uses colours... *-)
Use the newline character like you can in every other string in JScript:

\n

Have you actually tried it?  Putting a new line character in the contact toast didn't work when I tried. :S

EDIT:  Hey, you can't just edit your post so it looks like you never said it would definitely work! :P  You should have tested it BEFORE you posted! :P


And I didn't write that bit of the code btw, that was Matty, I wrote the code that displayed the toasts on sign in, since that was the original suggestion, then Matty added timer code to bring it up again when that was asked for too.  I wouldn't have thought to recall an event function... dunno why, just never considered it a possibility. :/

EDIT2:  See, I'm not lying, that bit isn't my code. :P

This post was edited on 09-01-2006 at 10:15 AM by alexp2_ad.
09-01-2006 10:05 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: RE: RE: RE: [release] Who's online
quote:
Originally posted by alexp2_ad
You should have tested it BEFORE you posted! :P
says he who needs several posts to post a working script snippet and said "(...) though I haven't tested." ;):p:D.... anyways, it wasn't my intention to change the post in that way though... and you quoted my original post also, so....

for what it is worth: sorry :$


quote:
Originally posted by alexp2_ad
And I didn't write that bit of the code btw, that was Matty, I wrote the code that displayed the toasts on sign in, since that was the original suggestion, then Matty added timer code to bring it up again when that was asked for too.  I wouldn't have thought to recall an event function... dunno why, just never considered it a possibility. :/

EDIT2:  See, I'm not lying, that bit isn't my code. :P

lol, ok, ok, I believed you from the first time :p;) It was just that you posted it.... I'll edit my post again.


blah... off topic spam this post is

This post was edited on 09-01-2006 at 05:36 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-01-2006 05:30 PM
Profile PM Find Quote Report
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
37 / Male / –
Joined: May 2004
Status: Away
RE: RE: RE: RE: RE: RE: [release] Who's online
quote:
Originally posted by CookieRevised
says he who needs several posts to post a working script snippet and said "(...) though I haven't tested." ;):p:D

1.  They all worked, but some weren't as aesthetically pleasing. :P
2.  I pointed out I hadn't tested it, I didn't say it in the form of "this will definitely work, and you're stupid not to have figured it out". :P

EDIT:  And I didn't post that bit of the code. :S  Matty did, I just linked to it right there. :S  And it was pointed out I didn't write it all right at the top.  The only time I posted that code was in the modified script above, that I posted so people didn't have to manually go through and make the changes I'd made. :S

This post was edited on 09-01-2006 at 05:41 PM by alexp2_ad.
09-01-2006 05:38 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [release] Who's online
quote:
Originally posted by alexp2_ad
"this will definitely work, and you're stupid not to have figured it out". (Smilie)
I didn't either, did I ? hmmm... yeah I did I guess...

Let me defend myself in saying I wanted to reply short without any fuzz... guess that backfired to me...
quote:
Originally posted by alexp2_ad
The only time I posted that code was in the modified script above, that I posted so people didn't have to manually go through and make the changes I'd made.
Which is what I meant with "the script alex posted".

This post was edited on 09-01-2006 at 05:47 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-01-2006 05:44 PM
Profile PM Find Quote Report
Pages: (5): « First « 1 2 [ 3 ] 4 5 » Last »
« Next Oldest Return to Top Next Newest »


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