What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » USay 1.1

USay 1.1
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: USay 1.1
PS: code loop blocks like
code:
var i;
i = new Enumerator( Contacts );
while( !i.atEnd() ) {
    var Contact = i.item();
    if( Contact.Email == Arg ) {
        return Contact.Email;
    }
    i.moveNext();
}
can be made much shorter like so:
code:
for (var i = new Enumerator(Contacts); !i.atEnd(); i.moveNext()) {
    var Contact = i.item();
    if (Contact.Email === Arg) return Contact.Email;
}
or
code:
var i = new Enumerator(Contacts);
for (; !i.atEnd(); i.moveNext()) {
    var Contact = i.item();
    if (Contact.Email === Arg) return Contact.Email;
}
in case you need to go thru the enumeration a couple of times like in the GetContactEmail procedure.

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

And to prevent possible screwups when a user signs out and signs back in with another Windows Live Id: If you use timers, always make sure the ID of the timer is unique to the user's email.

This means that a hardcoded name (like 'restorename') can conflict with the previous running timer from the user who was signed in before. So, better make that name something like 'restorename' + Messenger.MyEmail

Or kill all timers as soon as the user signs out.


;)

This post was edited on 06-16-2008 at 06:59 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-16-2008 06:40 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
USay 1.1 - by michaelbadichi on 06-15-2008 at 06:38 PM
RE: USay 1.1 - by Basilis on 06-15-2008 at 07:18 PM
RE: USay 1.1 - by MrT on 06-15-2008 at 08:52 PM
RE: USay 1.1 - by CookieRevised on 06-15-2008 at 11:35 PM
RE: USay 1.1 - by mynetx on 06-16-2008 at 06:59 AM
RE: USay 1.1 - by Jimbo on 06-16-2008 at 07:05 AM
RE: USay 1.1 - by mynetx on 06-16-2008 at 09:02 AM
RE: USay 1.1 - by cokacola on 06-16-2008 at 01:58 PM
RE: RE: USay 1.1 - by michaelbadichi on 06-16-2008 at 06:33 PM
RE: USay 1.1 - by Basilis on 06-16-2008 at 02:13 PM
RE: USay 1.1 - by michaelbadichi on 06-16-2008 at 06:07 PM
RE: USay 1.1 - by CookieRevised on 06-16-2008 at 06:18 PM
RE: RE: USay 1.1 - by michaelbadichi on 06-16-2008 at 06:24 PM
RE: USay 1.1 - by michaelbadichi on 06-16-2008 at 06:18 PM
RE: USay 1.1 - by Basilis on 06-16-2008 at 06:22 PM
RE: RE: USay 1.1 - by michaelbadichi on 06-16-2008 at 06:27 PM
RE: USay 1.1 - by Menthix on 06-16-2008 at 06:31 PM
RE: RE: USay 1.1 - by michaelbadichi on 06-16-2008 at 06:42 PM
RE: USay 1.1 - by CookieRevised on 06-16-2008 at 06:40 PM
RE: RE: USay 1.1 - by michaelbadichi on 06-16-2008 at 06:45 PM
RE: USay 1.1 - by CookieRevised on 06-16-2008 at 06:58 PM
RE: USay 1.1 - by michaelbadichi on 06-16-2008 at 07:06 PM
RE: USay 1.1 - by CookieRevised on 06-16-2008 at 07:22 PM
RE: USay 1.1 - by michaelbadichi on 06-16-2008 at 07:41 PM
RE: USay 1.1 - by CookieRevised on 06-16-2008 at 09:56 PM
RE: USay 1.1 - by CyberMew on 07-02-2008 at 05:30 PM
RE: USay 1.1 - by mshaerqtr on 07-02-2008 at 08:00 PM
RE: USay 1.1 - by MrT on 07-06-2008 at 10:03 AM
RE: USay 1.1 - by michaelbadichi on 07-16-2008 at 04:20 PM
RE: USay 1.1 - by CyberMew on 08-01-2008 at 06:56 PM
RE: USay 1.1 - by Basilis on 08-01-2008 at 08:51 PM
RE: USay 1.1 - by CyberMew on 08-02-2008 at 07:42 AM
RE: USay 1.1 - by riahc4 on 08-19-2008 at 02:08 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