SRL Archive - OSR Help

Save and retrieve settings


Mr. Doctor

2010-02-05 07:03:17

How do I save settings from a form and load it onto the form for next time?

Cartmann

2010-02-05 08:29:15

Like save an integer from a running script, close the script, and have the same integer working the next time you turn it on?

I would use a website to store it.

Awkwardsaw

2010-02-05 08:46:42

saveinifile()
loadinifile()

:)

Frement

2010-02-05 09:41:11

If you use a site, have a MySQL database in there and some PHP scripts to retrieve / save the values.

MylesMadness

2010-02-05 15:13:12

SaveSetting
LoadSetting

Mr. Doctor

2010-02-05 15:33:07

Ok, how do I use save setting and load setting?

MylesMadness

2010-02-05 17:05:23

program New;
begin
SaveSetting('ScriptName', 'Setting to save', 'Value');
writeln(LoadSetting('ScriptName', 'Setting to save'));
end.

Mr. Doctor

2010-02-05 18:25:57

Thanks Myles :D

Sex

2010-02-05 18:32:31

I would use WriteINI and ReadINI though because Save/LoadSetting saves it in the registry or temp or something and it is not easily accessible (without using SCAR).

WriteINI and ReadINI allow you to pass the name of the file to write/read to/from.

The parameters are pretty much identical aside from the fact they require an extra Filename parameter.