Hi!
I have not tried it, but propably something like the following is the fastest:
function getIniValue theFile,theGroup,theKey
put false into groupFound
repeat for each line aLine in url ("file:"&theFile)
if not groupFound then
if aLine is "["&theGroup&"]" then
put 1 into state
end if
else
-- use token here, so whitespace can be ignored.
if token 1 of aLine is theKey and token 2 of aLine is "=" then
return token 3 to -1 of aLine
end if
if char 1 of aLine is "[" then -- another group!!!
exit repeat
end if
end if
end repeat
return empty
end getIniValue
Regards
R�diger
--------------------------------------------------------------------
| Ruediger zu Dohna GINIT GmbH 0721-96681-63 [EMAIL PROTECTED] |
| PGP-Fingerprint: F1 BF 9D 95 57 26 48 42 FE F8 E8 02 41 1A EE 3E |
--------------------------------------------------------------------