Jump to content
Sign in to follow this  
4Eyes

Is there a way to pass a variable to IniRead()

Recommended Posts

4Eyes

Hi folks,

Yes, I have read the help file and yes, I have searched the forums.

I'd like to be able to read a variable number of parameters from an ini file so would like to do something like this:

$MyVar = IniRead("MyIniFile", "MySection", $KeyCount, "n/a")

but I get "Expected a "=" operator in assignment statement.:".

I've also found that build the whole list of arguaments into a string and passing that doesn't work.

I'd REALLY not like to have to preset the number of keys that can be used and it would make pretty ugly code too.

Any help will be gratefully accepted.

Ta,

4Eyes

Share this post


Link to post
Share on other sites
CodyBarrett

inireadsection()

sorts the keys & values into an array

$Array[Key][Value]

Edited by CodyBarrett

Share this post


Link to post
Share on other sites
MrMitchell

You can try INIReadSection()

Edit: Heh Cody beat me to it.

Edited by MrMitchell

Share this post


Link to post
Share on other sites
CodyBarrett

haha sry my man

Share this post


Link to post
Share on other sites
4Eyes

That's brilliant! Thank you.

Truly... I did research this before asking... there's sooooo much here though.

Regards,

4Eyes

Share this post


Link to post
Share on other sites
CodyBarrett

its all in the AUTOIT>funtion reference>file management

section of help file

Share this post


Link to post
Share on other sites
4Eyes

its all in the AUTOIT>funtion reference>file management

section of help file

yes, it is. I didn't recognise it for the solution to my problem that I'm VERY happy to say, it is.

Share this post


Link to post
Share on other sites
CodyBarrett

your welcome i love the helpfile :D it is my best friend... well.... not literaly but you know haha

Share this post


Link to post
Share on other sites
MrMitchell

i love the helpfile :o it is my best friend

You should put that in your sig LoL :D

By the way your "Decisions/Decisions" link in broken, I was curious what it was.

Share this post


Link to post
Share on other sites
CodyBarrett

hmmm it is... ill make a topic in Examples... its not very impressive just a number generator.. OFF topic.. well yeah the helpfile has EVERYTHING that was designed for ScitTE.. and some stuff others have put in.. gonna go fix ma links :D

EDIT

fixed lol...

Edited by CodyBarrett

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  

×