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)