 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Dragonscloud
Joined: 16 Jul 2005 Posts: 96
|
Posted: Wed Mar 22, 2006 9:01 am Post subject: Small help file addition |
|
|
Upon finding out that one of my scripts would have problems due to the size limitations of .ini files, I wrote a series of functions that do the same thing as the Ini commands but usable with any plaintext file format and with a little extra functionality.
It dawned on me that with the Ini commands, the file extension has to be specified and it might be because IniWrite, etc., can already function with
other file types. I tested it and lo and behold I had spent the last few days reinventing the wheel.
The upside is that it gave me a foundation to hammer out an extended ini
(.xini) format that includes subsections and that will help me consolidate several data files into one in my journaling script. Also, it's been a great learning experience and I've come up with a couple of good helper functions that will save me some headaches in the future.
Before someone else does the same redundant thing that I at first did, could you make a note in the help file that the Ini commands also work with other plaintext files?
For my next trick, I'm going to invent a gaseous substance that when inhaled keeps the body alive.  _________________ “yields falsehood when preceded by its quotation” yields falsehood when preceded by its quotation. |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Wed Mar 22, 2006 9:44 am Post subject: |
|
|
Just curious, what is the limit of an .ini file? _________________ my lame sig  |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Wed Mar 22, 2006 10:08 am Post subject: |
|
|
I thought it was in the documentation, but I can't find it right now.
I think an INI file is limited to 64KB, the good old Win16 limitation, in times were x86 processors used segmented memory (64KB segments, IIRC).
I don't know if there is a limitation on the lenght of one line.
Other limitation: a value has to be on one line (or use a separator to be replaced by a newline).
@Dragonscloud: INI files are plaintext files...
I don't see why you consider you were reinventing the wheel if you overcome INI format limitations and extended it.
And indeed, these functions work with any file extension, it seemed obvious (see .INF and .REG files), since it is a format, but it may worth indicating it.
Also a little known fact is the use of ; as comment mark. I saw // too, in a Microsoft file, perhaps actually anything unexpected is just ignored...
Note that you can write multiline values, but you can't read them back. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|