| View previous topic :: View next topic |
| Author |
Message |
ranomore
Joined: 06 Nov 2004 Posts: 170 Location: Salt Lake City, UT
|
Posted: Mon Feb 21, 2005 7:06 pm Post subject: IniRead [No Section] |
|
|
What would I have to do to read/write from an ini file where the information is not listed under a [section] heading? It still meets the KEY=Var format.
EDIT:
If it's not possible with IniRead/IniWrite, I'm sure I can do it with a file read loop. Just curious if it is. |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 2951 Location: Minnesota
|
Posted: Mon Feb 21, 2005 7:40 pm Post subject: |
|
|
IniRead can only read from correctly formatted, standard INI files. In truth, if it doesn't have any sections, it's not a true INI file.
To answer your question more directly: it requires the third parameter (section) to be non-blank. |
|
| Back to top |
|
 |
ranomore
Joined: 06 Nov 2004 Posts: 170 Location: Salt Lake City, UT
|
Posted: Mon Feb 21, 2005 9:19 pm Post subject: |
|
|
thanks jonny. I'd already gotten the erro message. It's a weird ini file. It has what i'd call a pre-amble section that has stored values in it, before the start of the normal-correctly formatted-sections. It's for M$ Visual Source Safe, so it's non-standardness is not too surprising. Why do they make Automation, Hotkeys, and Scripting so hard? |
|
| Back to top |
|
 |
Watcher
Joined: 27 Dec 2004 Posts: 60
|
Posted: Mon Feb 21, 2005 10:12 pm Post subject: |
|
|
You might try adding your own section header to it. It's very possible that although the program does not add one it will not complain if you do.  |
|
| Back to top |
|
 |
|