Sign in to follow this  
Followers 0
Dieuz

IniReadSection

2 posts in this topic

#1 ·  Posted (edited)

How can I set an InireadSection to begin reading from a specific value in that section?

[INI]

[Numbers]
1= a
2= b
3= c
4= d
5= e
6= f
7= g
8= h
9= i
10= j

If I use this script it will start from the first value in the Ini:

$ReadPicture = IniReadSection(@ScriptDir & "\Setup.ini", "Numbers")
            

            For $a = 5 to 10
                For $n = 1 to $ReadPicture[0][0]
                    GUICtrlSetImage(Eval('Picture_' & $a),$ReadPicture[$n][1])
                Next
            Next

How can I make it start reading from the "5" value?

Edited by Dieuz

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Is there a reason you can't just use INIRead ?

IniRead(@ScriptDir & "\Setup.ini", "Numbers", "5")

Edit : heh, small fix.

Edited by Helge

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