Jump to content
Sign in to follow this  
ea9000

how to list all key name in an ini file section

Recommended Posts

ea9000

hi All,

how can I list all the available key names of a section in an ini file?

[section]

key_1=

Key_2=

key_3=

.

.

.

key_n=

Share this post


Link to post
Share on other sites
seandisanti

hi All,

how can I list all the available key names of a section in an ini file?

[section]

key_1=

Key_2=

key_3=

.

.

.

key_n=

check out inireadsectionnames and inireadsection. between those two and a loop you should be straight. examples are in help file

Share this post


Link to post
Share on other sites
jayterry

IniReadSection - Reads all key/value pairs from a section in a standard format .ini file.

Share this post


Link to post
Share on other sites
ea9000

yes found it thnx for the replay.

cheers

$var = IniReadSection( "config.ini", "Environment_Variables")

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.