What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Some big help I need

Some big help I need
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Some big help I need
And if you want to improve even further upon that code snippet, you go for a fast numeric loop instead of a slower property enumeration loop.

js code:
var Contacts = ["johnsmith@hotmail.com", "abcdefg@hotmail.com"];

function OnEvent_Signin(Email)
{
>>>    for (var i=0, len=Contacts.length; i < len; ++i)<<<
    {
        if (Contacts[i] === Email)
        {
            // <snipped>
        }
    }
}
Or with a reverse while loop:
js code:
function OnEvent_Signin(Email)
{
>>>    var i = Contacts.length;<<<
>>>    while(i--)<<<
    {
        if (Contacts[i] === Email)
        {
            // <snipped>
        }
    }
}
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
07-09-2010 12:55 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Some big help I need - by SR01001010 on 07-08-2010 at 07:36 PM
RE: Some big help I need - by matty on 07-08-2010 at 07:39 PM
RE: Some big help I need - by ultimatebuster on 07-09-2010 at 02:36 AM
RE: Some big help I need - by whiz on 07-09-2010 at 08:12 AM
RE: Some big help I need - by Matti on 07-09-2010 at 12:55 PM
RE: Some big help I need - by SR01001010 on 07-09-2010 at 11:51 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