Write config File
Posted: Fri Jul 20, 2018 11:37 am
Hi,
i am writing informations into a configuration file line by line with
Later, I am reading the informations out of the file:
But in the case that in my file is a CR (for example) I have a problem because I am reading the exact number of the line 
Any other ideas how to make this easier? My Idea is to work with items in the config file:
host: "127.0.0.1"
Username: "Max Mustermann"
Another Idea is if it is possible to change only one item (e.g. only Username) without writing the complete file.
Stefan
i am writing informations into a configuration file line by line with
Code: Select all
put tpath & "/test.txt" into theFile
put field "Field_DB_Server" into collected_data
put CR & the field "Field_DB_user" after collected_data
Code: Select all
put tpath & "/test.txt" into theFile1
put url("file:" & thefile1) into saved_data
put line 1 of saved_data into l1
put line 2 of saved_data into l2

Any other ideas how to make this easier? My Idea is to work with items in the config file:
host: "127.0.0.1"
Username: "Max Mustermann"
Another Idea is if it is possible to change only one item (e.g. only Username) without writing the complete file.
Stefan