What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Is there a script?

Is there a script?
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Is there a script?
quote:
Originally posted by davidpolitis
code:
function isEnabled()
{
    try
    {
        val = Shell.RegRead(RegPath);
        if(val == "0")
        {
            return false;
        }
    }
    catch (err)
    {
          Shell.RegWrite(RegPath, "1");
    }
    return true;
}

:(

Why do people still use such a bad practice of cluttering people's registry by storing a standard value when there hasn't been any change in that value (it's the standard/default one)? What's wrong with having a default value just in memory? :(

CookieRevised's reply to [Release] Easy Math and Symbols 2.0.3 (second part of post)


code:
function isEnabled() {
    try {
        var val = Shell.RegRead(RegPath)
    } catch(err) {
        var val = 1
    }
    return (val != 0)
}

the rest looks almost perfect though (except for Messenger.MyUserID instead of Messenger.MyEmail (security reasons), and a very few tiny things which could be done a bit more shorter/directly) (y)

This post was edited on 02-27-2010 at 11:19 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
02-27-2010 11:05 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Is there a script? - by BlitZeR on 02-26-2010 at 01:35 PM
RE: Is there a script? - by djdannyp on 02-26-2010 at 01:53 PM
RE: RE: Is there a script? - by BlitZeR on 02-26-2010 at 01:54 PM
RE: Is there a script? - by AngelDevil on 02-26-2010 at 09:10 PM
RE: Is there a script? - by billyy on 02-26-2010 at 09:46 PM
RE: Is there a script? - by davidpolitis on 02-26-2010 at 11:49 PM
RE: Is there a script? - by billyy on 02-27-2010 at 01:04 AM
RE: Is there a script? - by BlitZeR on 02-27-2010 at 08:34 AM
RE: Is there a script? - by AngelDevil on 02-27-2010 at 11:08 AM
RE: Is there a script? - by billyy on 02-27-2010 at 11:39 AM
RE: Is there a script? - by AngelDevil on 02-27-2010 at 01:08 PM
RE: Is there a script? - by davidpolitis on 02-27-2010 at 10:40 PM
RE: RE: Is there a script? - by CookieRevised on 02-27-2010 at 11:05 PM
RE: Is there a script? - by davidpolitis on 02-27-2010 at 11:22 PM
RE: Is there a script? - by CookieRevised on 02-27-2010 at 11:25 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