| View previous topic :: View next topic |
| Author |
Message |
zero Member
Joined: 16 Sep 2003 Posts: 2
|
Posted: 16/09/03 16:09 Post subject: How do i read stuff from a config (.cfg) file? |
|
|
| I would really need to read some stuff out of another application's config (.cfg) file in my application. How do I do that? |
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 206
|
Posted: 16/09/03 17:15 Post subject: |
|
|
| Do you know the format and fields of the config file? |
|
| Back to top |
|
 |
Johnny_Bit Junior Member
Joined: 15 Jun 2003 Posts: 82
|
Posted: 16/09/03 19:41 Post subject: |
|
|
| I'll give you advice: "File extension isn't so important, that data inside file" besides basing on file extension you won't ever know if file is this file, that you're thinking |
|
| Back to top |
|
 |
zero Member
Joined: 16 Sep 2003 Posts: 2
|
Posted: 23/09/03 12:26 Post subject: |
|
|
The line I would need looks like this:
"value" "25"
I would also need to save this line into the cfg file after modifying, because other applications also use this file. |
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 206
|
Posted: 23/09/03 16:47 Post subject: |
|
|
| You can use a TStringList to read the file, pharse and change the content, and save it back. |
|
| Back to top |
|
 |
|