AppSetting helper

BlitzMax Forums/BlitzMax Programming/AppSetting helper

JoshK(Posted 2007) [#1]
This will load settings from the commandline and a settings file, and will save the settings file.

Use parameters like this:
+settingname settingvalue +setting2 anothervalue -setting3

This results like this:
settingname=settingvalue
setting2=anothervalue
setting3=1

Then you retrieve the settings to your app like this:
SomeSetting=TAppSetting.get("SomeSetting")
MaximizeWindow=Int(TAppSetting.get("MaximizeWindow",MaximizeWindow))

And calling TAppSetting.save() will save all settings.