Sign in to follow this  
Followers 0
DNnlee

INIreadsection question

2 posts in this topic

#1 ·  Posted (edited)

never mind, i tested it out, and got that question answered....

now i got another question.. how do i add comments?

IniWrite("data.ini", "Bot", "Acc", " Your Acc Name")

i want it to write

[bot]

acc= your acc name ;;; and i should add some comment here...

but when i do Iniread... it read the comments also..

Edited by DNnlee

Share this post


Link to post
Share on other sites



Do an additional ini entry but start the key off with ';'

[section]

key=value

;key=comment

Or you can do something like this

[section]

key=value

key-comment=value

Which would look like:

[defaults]

restart=true

restart-comment=setting this to true will cause your computer to restart

Writing it like you have will make read calls for the key value return everything that is in the line which is fine if you want to have to parse the string and trim the extra off but that's extra work. I'm just saying to write 2 ini entries.


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

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