You are here

Use of [FileWriteN] in conjunction with the file "audacity.cfg"

4 posts / 0 new
Last post
tapsklaps
Offline
Last seen: 5 years 5 months ago
Developer
Joined: 2010-10-17 08:11
Use of [FileWriteN] in conjunction with the file "audacity.cfg"

In the file "AudacityPortable.ini" I've discovered, that in the sections [FileWrite1] - [FileWrite5] at the entry "File" a path with the file "audacity.cfg" was used. But due to the used Typ "INI" is this code invalid. Accordingly, the sections [FileWrite1] - [FileWrite5] have no effect.

depp.jones
Offline
Last seen: 22 hours 51 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
Huh?

I don't know how you came to that conclusion but they do exactly what they should (they replace the Value of the the Key in the Section of the INI file specified in File).
It is irrelevant that it has an ini suffix, it is just a method of changing settings that differs from ConfigWrite. You could use both methods in many cases and choose, wich one fits better to the needs.

tapsklaps
Offline
Last seen: 5 years 5 months ago
Developer
Joined: 2010-10-17 08:11
Ambiguity in the documentation

Unfortunately is not explicit described in the documatation, if it's possible to use the section [FileWriteN] also with other than *.ini files in case of Type=INI. I don't like to test everytime anything in case of such unclear statments. Sorry

Therefore I think, that it's more logical to use Typ=ConfigWrite in this situation.
Are you really sure that Type=INI can apply on the file "audacity.cfg"?

depp.jones
Offline
Last seen: 22 hours 51 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
Yes.The different methods

Yes.
The different methods are there to handle special cases. Imagine a config file with different sections (like an ini file) but with the same entries.
Example:
...
[Plugin1]
Path=X:\Folder\Plugin1\...
...
[Plugin2]
Path=X:\Folder\Plugin2\...
...

If you try to write a specific setting called path for the second Plugin, you could only do that with Type=INI as there are different settings with the same description and ConfigWrite would fail.
-edit-
Oops found an ugly typo and could not withstand to correct it. Wink

Log in or register to post comments