What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » HELP - Arrays in the registry!

HELP - Arrays in the registry!
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. RE: HELP - Arrays in the registry!
quote:
Originally posted by CookieRevised
Provided "Id" and "Title" were saved as a string (and read out as a string), yes...

PS: since this is JScript, you could also do:
JScript code:
var WndLstId = ReadRegistry("Lst", "Id");
WndLstId = WndLstId.split(",");
var WndLstTitle = ReadRegistry("Lst", "Title");
WndLstTitle = WndLstTitle.split(",");
// ...

So you don't realy need the temporary variables, you could just assign a string to your existing WndLstWhatever  variable and then use that same string variable to make it into an array. JScript is fine with that (as it automatically converts and overwrites the types in this case).

This might save you a lot of variable names and code.

Although there are a lot more, and more efficient methods to do what you do though (storing a lot of individual variables in the registry I mean).

Well, I did find an even quicker method, that still uses normal variables:
Javascript code:
WndLstId = ReadRegistry("Lst", "Id").split(",");
WndLstTitle = ReadRegistry("Lst", "Title").split(",");
// ...




quote:
Originally posted by markee
May I make the recommendation to use an XML or INI file rather than registry keys for such a large amount of data.  You seem to have layered information which would fit nicely in an XML format imho.

Here is a link to information http://www.devguru.com/technologies/xmldom/quickref/xmldom_index.html . You might also want to look around for some code snippets.  I hope this helps.
Well, I have had a look, but I'm still confused with the whole idea of XML reading/writing.  :S
06-20-2009 11:55 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
HELP - Arrays in the registry! - by whiz on 06-18-2009 at 06:20 PM
RE: HELP - Arrays in the registry! - by Mnjul on 06-18-2009 at 06:37 PM
RE: HELP - Arrays in the registry! - by whiz on 06-18-2009 at 07:02 PM
RE: HELP - Arrays in the registry! - by Mnjul on 06-18-2009 at 07:06 PM
RE: HELP - Arrays in the registry! - by Matti on 06-18-2009 at 07:07 PM
RE: HELP - Arrays in the registry! - by Spunky on 06-18-2009 at 07:14 PM
RE: HELP - Arrays in the registry! - by whiz on 06-18-2009 at 07:56 PM
RE: RE: HELP - Arrays in the registry! - by whiz on 06-19-2009 at 03:56 PM
RE: HELP - Arrays in the registry! - by Mnjul on 06-18-2009 at 08:15 PM
RE: HELP - Arrays in the registry! - by CookieRevised on 06-19-2009 at 09:34 PM
RE: HELP - Arrays in the registry! - by markee on 06-20-2009 at 07:14 AM
RE: HELP - Arrays in the registry! - by whiz on 06-20-2009 at 11:55 AM
RE: HELP - Arrays in the registry! - by NanaFreak on 06-20-2009 at 12:05 PM
RE: HELP - Arrays in the registry! - by whiz on 06-21-2009 at 09:49 AM


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