| How to read write keys into a ".ini" type of file. |
| Below is some
code of how you could do it in plain Gui4Cli - just for reference.. This is best done with a little programming.. Handling any
type of text file is easier if you load it into a listview, do the changes, then save it
back. Below is some code that will allow you to add or replace keys in .ini files. You
could call it with something like: |
| xListview 0 0 0 0
'' '' var attr ID lv xRoutine AddIniKey
IniPath SectionName Key Value // Below is the routine that does the
actual work. xRoutine AddKey SectionName Key
Value // find the section // if section not found,
append new one.. // go through the next
records to find if the // if we
encounter another section, insert // split the
line into key and value lv go next //
next line.. // if we reach here,
append to end of list..
|