1. Why? What is your intended usage? I'm just wondering.
2. I don't know if the Preferences library actually keeps the file open, with a useful Location pointer... I assume OpenPreferences() loads the whole file into a memory structure for reading and writing, until you save it back to disk.
[X Y W H BOXNAME]
097;104;033;040;Bass;
105;112;041;048;Strings;
113;120;049;056;Ensemble;
121;128;057;064;Brass;
...
[MSB LSB PRG VOICES]
000;000;001;GrandPno;
000;000;002;BritePno;
...
The Preferences commands would be very usefull to handle these too,
except all needs to be seperated with a = sign (sadly not changeable).
Retrieve a complete line isn't possible imo, so Stringfied etc. can't be of use.
That all, while the Preferences commands are very close to do all that too.
It might be even better to add only two commands like :
WritePreferenceStringN <= the N for a complete line
ReadPreferenceStringN <= the N for a complete line
Retrieve Preferences Filehandle and Loc() becomes obsolete then.
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
Joris wrote:Well I got a lot of files in this style :
[X Y W H BOXNAME]
097;104;033;040;Bass;
105;112;041;048;Strings;
113;120;049;056;Ensemble;
121;128;057;064;Brass;
...
[MSB LSB PRG VOICES]
000;000;001;GrandPno;
000;000;002;BritePno;
...
This is not the format of a preference file.
And it is very easy to read such a file using ReadFile() and ReadString().
After opening a file with ReadFile(), you can also use Loc() if you want.
Little John wrote:This is not the format of a preference file.
And it is very easy to read such a file using ReadFile() and ReadString().
After opening a file with ReadFile(), you can also use Loc() if you want.
I know that and use that already. It's just that the Preferences commands are very close to do that too,
but can't be used.
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
The Preferences commands are specialized for use with Preference files, like the JSON commands are specialized for use with JSON files, and like the XML commands are specialized for use with XML files.