UPDATE: 03-June-08 Now named _IniString_Read() etc. & code cleaned up/simplified more. Thanks MrCreatoR!
UPDATE: 03-June-08 Rewrote some of the code to make better use of RegExp and reduce complexity(?)
UPDATE: 02-June-08 Added _Ini_InMem_Delete(), Renamed UDF to Ini_InMem.au3 as now does more than just read
Over here http://www.autoitscript.com/forum/index.ph...showtopic=72602 CrazyMick was looking for a way to access the contents of an Ini file that's stored on a web server without downloading the file to the hard drive.
Obviously _InetGetSource() is the answer, but then being a noob with AutoIt CrazyMick didn't know how to parse the data once it was stored in a string variable.
Anyway, I put together these _Ini_InMem_Read() functions.
They behave just like the standard IniRead() functions with the same returns and error setting, except that instead of an actual Ini file name, they take a variable containing a string representing an Ini file structure as the first parameter.
Certainly they will be of limited use but I thought I would post them anyway.
Can also be used with reading an Ini file into memory; $var = FileRead("some.ini").
Notes: Haven't cleaned up all the code yet, may be some stray references to variables that aren't actually used.
Some brighter coder could probably simplify these functions, and if so, I'm open to suggestions.
Update: this attachement contains the latest version and replaces MrCreatoR's in post # 9 below
Edited by ResNullius, 10 June 2008 - 12:16 AM.