Sign in to follow this  
Followers 0
tbaror

IniReadSection more than one key/value

2 posts in this topic

#1 ·  Posted (edited)

Hi,

i am trying to read section in ini using IniReadSection that have more than one key/value in section

but in results i am getting only back only the first key/value using help example, is possible to get all key/value under section ?

thanks

$var = IniReadSection("C:\Temp\myfile.ini", "section2")
If @error Then 
    MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
    For $i = 1 To $var[0][0]
        MsgBox(4096, "", "Key: " & $var[$i][0] & @CRLF & "Value: " & $var[$i][1])
    Next
EndIf

[section]
key1=value1
key2=value2
key3=value3
Edited by tbaror

Share this post


Link to post
Share on other sites



Works fine for me.


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0