Shoutbox

Storing of data... - 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: Storing of data... (/showthread.php?tid=75524)

Storing of data... by Alxandr on 06-21-2007 at 07:54 PM

If i want to store some data for later, what do I do? For example if I wan't to store a List of users, how do I do that? So that when the user logs on again (on the same computer ofcause, js is client, not serverscript) the computer already has filled out the list for the user...


RE: Storing of data... by cooldude_i06 on 06-21-2007 at 08:24 PM

You can either store your data in an XML file, or in the registry. XML file is the "standard" for most apps I guess, but I suggest the registry because if a user updates the script, all previous settings won't be lost, where as with XML if the file is in the Script directory, they will be.

Here are some ways to access the registry.
http://www.mpscripts.net/code.php?cat=90


RE: Storing of data... by Alxandr on 06-21-2007 at 08:25 PM

But how do you do that in JS? (I preffer XML)...


RE: RE: Storing of data... by deAd on 06-21-2007 at 10:11 PM

You can use the Microsoft.XMLDOM ActiveX object to access XML.


quote:
Originally posted by cooldude_i06if a user updates the script, all previous settings won't be lost, where as with XML if the file is in the Script directory, they will be.
That depends on how the script is coded. For example, the Stickynotes script stores the notes in an XML file, but when you update the script the notes are not all deleted.
RE: Storing of data... by -dt- on 06-21-2007 at 10:52 PM

quote:
Originally posted by cooldude_i06
You can either store your data in an XML file, or in the registry. XML file is the "standard" for most apps I guess, but I suggest the registry because if a user updates the script, all previous settings won't be lost, where as with XML if the file is in the Script directory, they will be.

Here are some ways to access the registry.
http://www.mpscripts.net/code.php?cat=90
files in the script directory are only removed when the script is removed, so your settings xml will be safe :)
RE: Storing of data... by cooldude_i06 on 06-22-2007 at 01:23 AM

quote:
Originally posted by -dt-
quote:
Originally posted by cooldude_i06
You can either store your data in an XML file, or in the registry. XML file is the "standard" for most apps I guess, but I suggest the registry because if a user updates the script, all previous settings won't be lost, where as with XML if the file is in the Script directory, they will be.

Here are some ways to access the registry.
http://www.mpscripts.net/code.php?cat=90
files in the script directory are only removed when the script is removed, so your settings xml will be safe :)

But doesn't Plus remove the script first if you install a newer version. In that case the stored XML files will be removed.
RE: RE: Storing of data... by deAd on 06-22-2007 at 01:40 AM

quote:
Originally posted by cooldude_i06But doesn't Plus remove the script first if you install a newer version. In that case the stored XML files will be removed.

no, it doesn't..only when you uninstall the script.