Something like this.
section$="hello"
key$="test"
data$=""
` open the file
open to read 1, "c:\myfile.ini"
` read until we get the right section
search$="[" + section$ + "]"
` read file until we either hit the end, or find what we're looking for
currentline$=""
while file end(1) = 0 and currentline$ <> search$
read string 1, currentline$
endwhile
` if we've found what we're looking for...
if currentline$ <> ""
` make up the next search string - the name within the section
search$=key$ + "="
` look for it until end of file, we get the value, or we hit the next section
currentline$=""
while file end(1) = 0 and left$(currentline$,1) <> "[" and left$(currentline$, len(search$)) <> search$
read string 1, currentline$
endwhile
` If we have the key we are searching for, extract the data
if left$(currentline$, len(search$)) = search$
data$=right$(currentline$, len(currentline$) - len(search$) )
endif
endif
print "Located:"; data$
sync
wait key
Put the following into a file called c:\myfile.ini
[another]
test=456
[hello]
test=123
[yet another]
test=789
Now play