Sign in to follow this  
Followers 0
amaussa

read/view and write .ini file

4 posts in this topic

I seek a simple model of script which can read a ini file, to post the values in a table

and after modifications values to record again in the input file

example of .ini file

[ATTRIBUTES]

cle1=001

cle2=002

cle3=003

cle4=equipement

cle5=.

...

I am new with this environment and a example to help little with undestand and to save time

I don't have pb to use function iniread,iniwrite but I don't undextand how to interface the value on .ini file with GUI interface.

there are many sample on the forum, but I would like to find for example a very simple program

( read .ini , view the value on the box or other, possibilite to modify this value, and close and save the new value inside the .ini)

thank

AM

Share this post


Link to post
Share on other sites



IniWrite ("yourfile.ini", "ATTRIBUTES", "cle1", "001" )

IniWrite ("yourfile.ini", "ATTRIBUTES", "cle2", "002" )

IniWrite ("yourfile.ini", "ATTRIBUTES", "cle3", "003" )

IniWrite ("yourfile.ini", "ATTRIBUTES", "cle4", "qupement" )

to read those values use

IniRead ("yourfile.ini", "ATTRIBUTES", "cle1", "")

IniRead ("yourfile.ini", "ATTRIBUTES", "cle2", "")

IniRead ("yourfile.ini", "ATTRIBUTES", "cle3", "")

IniRead ("yourfile.ini", "ATTRIBUTES", "cle4", "")

Share this post


Link to post
Share on other sites

IniWrite ("yourfile.ini", "ATTRIBUTES", "cle1", "001" )

IniWrite ("yourfile.ini", "ATTRIBUTES", "cle2", "002" )

IniWrite ("yourfile.ini", "ATTRIBUTES", "cle3", "003" )

IniWrite ("yourfile.ini", "ATTRIBUTES", "cle4", "qupement" )

to read those values use

IniRead ("yourfile.ini", "ATTRIBUTES", "cle1", "")

IniRead ("yourfile.ini", "ATTRIBUTES", "cle2", "")

IniRead ("yourfile.ini", "ATTRIBUTES", "cle3", "")

IniRead ("yourfile.ini", "ATTRIBUTES", "cle4", "")

Thanks

But I want to be able to read the file .ini independamment of the value ( 001,...) and to post it. How to make?

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