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: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).
var WndLstId = ReadRegistry("Lst", "Id");
WndLstId = WndLstId.split(",");
var WndLstTitle = ReadRegistry("Lst", "Title");
WndLstTitle = WndLstTitle.split(",");
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:
WndLstId = ReadRegistry("Lst", "Id").split(",");
WndLstTitle = ReadRegistry("Lst", "Title").split(",");
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.