Page 1 of 1

How to change Preference file value?

Posted: Mon Jun 08, 2020 4:46 pm
by Mythros
Hi all! How do you edit a value after having written a Preferences.pref file?

ANY help as always is GREATLY appreciated!

Thank You! <3

Re: How to change Preference file value?

Posted: Mon Jun 08, 2020 5:54 pm
by Josh
Help wrote: WritePreference...()

Creates or changes the specified key and its associated ...

Re: How to change Preference file value?

Posted: Mon Jun 08, 2020 6:16 pm
by Mythros
Ok, so it's safe just to keep writing? But the problem is I need to change one simple value. not the whole file.

Thank You! <3

Re: How to change Preference file value?

Posted: Mon Jun 08, 2020 6:45 pm
by dibor
Mythros wrote:I need to change one simple value
Hi.
What value?
If Integer - WritePreferenceInteger(Key$ , Value)
If Float - WritePreferenceFloat(Key$ , Value.f)

Please look in the help file, there shows all possible options.

Re: How to change Preference file value?

Posted: Mon Jun 08, 2020 9:17 pm
by infratec
You should do some testing :wink:

If you open the preferences once,
you can always use one or more WritePreference.. commands.
If you call ClosePreference() at the end of your code the file is written completly. If you want or not.

Re: How to change Preference file value?

Posted: Tue Jun 09, 2020 12:28 am
by Mythros
Thanks alot, guys! <3 :)