Hypertrophy Posted September 19, 2009 Share Posted September 19, 2009 how do i write to an ini file in [section1] and when there are 1000 keys in that section write to the next section [section2]? Help me grasp the concept please. God Bless. Link to comment Share on other sites More sharing options...
dantay9 Posted September 19, 2009 Share Posted September 19, 2009 IniReadSection(). Then find the size of the array. Link to comment Share on other sites More sharing options...
omikron48 Posted September 19, 2009 Share Posted September 19, 2009 Just count the number of IniWrite you make into a particular section and when you reach 1000, change the section name you feed into IniWrite. Do note that there is a file size limit with .ini in AutoIt. 33kb, I think. I think you need the Ex version for larger files. Not that familiar since I've never had the need to use large .ini files. That is if you're doing the writing. If you're reading an .ini file, you use IniReadSection. The number of keys in the section is in the [0][0] element of the returned array from IniReadSection. Link to comment Share on other sites More sharing options...
Hypertrophy Posted September 20, 2009 Author Share Posted September 20, 2009 IniReadSection(). Then find the size of the array. Thanks. that was too simple. i feel stupid now. Just count the number of IniWrite you make into a particular section and when you reach 1000, change the section name you feed into IniWrite. Do note that there is a file size limit with .ini in AutoIt. 33kb, I think. I think you need the Ex version for larger files. Not that familiar since I've never had the need to use large .ini files. That is if you're doing the writing. If you're reading an .ini file, you use IniReadSection. The number of keys in the section is in the [0][0] element of the returned array from IniReadSection. hmmm. i just a second ago read 10 sections containing 1000 keys in each section. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now