Hi!
I have a file that i would liket to use with ReadIni, but the problem is that it does not have any [section] part. It is a plain file with a lot of X=Thisandthat.
Is there a way to use ReadIni on a file like this. Or do i have to add a [data] line at the top of it first?
Thanks!
Inifile without [sections]?
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 149
- Joined: Tue Mar 23, 2004 9:11 pm
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Hi,
To use ReadIniFile the file would need a [section] line. While you could use ReadLn and parse the data it sounds like it would be an awful lot easier just to add the [section] line to make it a regular ini file and then you can more easily use ReadIniFile. You could add the [section] line automatically to the top of the file using WriteLn. Or just do it manually if it's a once off process.
To use ReadIniFile the file would need a [section] line. While you could use ReadLn and parse the data it sounds like it would be an awful lot easier just to add the [section] line to make it a regular ini file and then you can more easily use ReadIniFile. You could add the [section] line automatically to the top of the file using WriteLn. Or just do it manually if it's a once off process.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?