Shoutbox

Writing to file/registry - 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: Writing to file/registry (/showthread.php?tid=62435)

Writing to file/registry by craig2k5 on 07-03-2006 at 04:20 PM

could some1 give me a hand please, ive created a script that shows a window when you type !config and allows you to enter 2 numbers
when you enter the 2 numbers i would like it to store them somewere (registry or a file w.e)
so that i can use them somewere else in the script.. any1 know how?


RE: Writing to file/registry by rob_botch on 07-03-2006 at 04:52 PM

The Scripting Wiki page has a very good article about writing to the registry. I used it for my program and it worked perfectly.

It can be found here


RE: Writing to file/registry by alexp2_ad on 07-03-2006 at 05:22 PM

http://mpwiki.net/The_Registry
http://mpwiki.net/Text_Files

And you can use GetControlText to get the text from the boxes in the window.


RE: Writing to file/registry by matty on 07-03-2006 at 05:26 PM

Registry Module.

Current I am working on version 1.1 which has EnumRegistryKeys and EnumRegistryValues.


RE: RE: Writing to file/registry by craig2k5 on 07-03-2006 at 05:52 PM

quote:
Originally posted by alexp2_ad
http://mpwiki.net/The_Registry
http://mpwiki.net/Text_Files

And you can use GetControlText to get the text from the boxes in the window.


i wanted to use this GetControlText but i cant figure out how to save the data in the text boxes in the window:^) lol
RE: Writing to file/registry by dramado on 07-03-2006 at 06:03 PM

use a textfile and eval();

in the textfile:
var1 = 38273;
var2 = 382773;

read the textfile into var a and do eval(a) it will evaluate the text and assign the saved values

function save()
{
writetofile('var1 = ' + var1 + ';var2 = ' + var2 + ';');
}

function load()
{
  eval(readallfile()); // will assign corresponding var1, var2 values
}

this way you dont have to create/delete any registry values and the files will be removed when your script is removed by the user


RE: Writing to file/registry by craig2k5 on 07-03-2006 at 06:10 PM

im sorry im new to programming with this lol :$ could you explain that a bit more please