does a registry string exhist - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: does a registry string exhist (/showthread.php?tid=62049) does a registry string exhist by JonnyT on 06-29-2006 at 07:11 PM
i know the registry options are limited but is tere away to find out if a certain string exhists? Im doing this becuase the script chucks out an error if i try to read from a string tht doesnt exhist. RE: does a registry string exhist by L. Coyote on 06-29-2006 at 07:18 PM
I use this to check if a key exists. code: This is just a workaround, not a real solution, but it works and prevents the script from returning an error. You can read more of try...catch...finally in the MSDN library. quote:Oh, genious. Seriously people, is there a difference? Except from saving 0.00001 second and a couple of bytes, is there really a difference? No? Then, let it go. RE: does a registry string exhist by matty on 06-29-2006 at 07:31 PM
http://mattyg.ca/geshi/registry.php RE: does a registry string exhist by RaceProUK on 06-29-2006 at 09:36 PM
quote: code: RE: does a registry string exhist by JonnyT on 06-29-2006 at 09:43 PM thanks matty your scripts worked great RE: RE: does a registry string exhist by CookieRevised on 06-29-2006 at 10:38 PM
quote:yes there is a difference. and "return tmp != "";" is prefereable. Moreover, checking if tmp is empty isn't a good thing todo as keys can also be empty (yet existing). That line should actually just be "return true". RE: does a registry string exhist by L. Coyote on 06-29-2006 at 10:57 PM
I already said in that post of mine, that if the person wants to directly return the string, then they simply change that part. RE: does a registry string exhist by RaceProUK on 06-30-2006 at 11:48 AM
quote:Get over it already! I'm actually slightly offended that you think I complain about other people's code: I don't, I suggest improvements. And I expect people to suggest improvements to my code. |