Ozi Posted September 22, 2007 Share Posted September 22, 2007 I need my script to be able to read a section without a set amount of lines and plug it into the script.Example[scriptPart1]send("blab")run("name.exe")The script will addsend("blab")run("name.exe")where if the ini said[scriptpart1]send("blab")it would only addsend("blab")the thing is I need to be able to have an infinite amount of lines as I want my script to mostly be held in the ini file so that people could download my script and only have to download the ini for updates and changes.The above post posted by AcidCorps that's in bold is VERY similar to what I want to do except I want to use actual variables.For example I want to have:[section1]key1=14key2=13and it will all the values that are in the INI inside my script and where if like AcidCorps stated above in his post if I did,[section1]key1=14It would only add the value 14. And as AcidCorps said I want to have an infinite amount of keys and values so people could configure what my program does with just the INI. How though? Link to comment Share on other sites More sharing options...
qazwsx Posted September 22, 2007 Share Posted September 22, 2007 im confused. How will these values tell you program wat to do. If i understand i think you want to use inireadsection, and then us a for loop to read the array. Link to comment Share on other sites More sharing options...
Ozi Posted September 22, 2007 Author Share Posted September 22, 2007 (edited) I'm assigning numbers 2-14 to hex values. It's for a button presser application. And yea, That's what someone told me but it doesn't work. Example, $varName = INIReadSection ( "C:\Documents And Settings\Ozi\Desktop\test.ini", "section1" ) Then I would have to do: If varName = "14" Then Msgbox ( 0, "", "whatever" ) and i cant do that because if the user put in a 14 or a combination of 14,13 like: key1 = 14,13 so im screwed. but i know this is possible because there are programs that can do this. Edited September 22, 2007 by Ozi Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 22, 2007 Moderators Share Posted September 22, 2007 You say infinite, but the standard ini functions only do 32 kb's.I don't see what is wrong with IniReadSection(), it reads everything in that section into an array... you could always parse the values to see if there is more than one with a StringSplit() or something.I'm thinking you need to re-think you're logic a bit, create an example ini, then create the script that would run it, and post what you have that stumped you to that point. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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