Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 13:33

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Autoit Iniread and question :)

Discussion on Autoit Iniread and question :) within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2007
Posts: 219
Received Thanks: 43
Autoit Iniread and question :)

Can anyone explain me how to make a script that replace already exist text in ini file instead of adding one text to.each line ?
Example
I added a "Save button" to my gui and i want to make script that will write new text instead old one in my ini file ( its "ExampleColor" ) but im not sure how to do it.
Can anyone explain me how to.do it.correctly ? Cause i tried to add
$write1 = iniwrite("config.ini","Config","ExampleColor","$in put1") but it dont replace last one, it just adds new text to that position in config ini.
owadziak is offline  
Old 07/19/2017, 21:31   #2
 
psydinger's Avatar
 
elite*gold: 0
Join Date: Apr 2017
Posts: 84
Received Thanks: 12
Referencing the manual, the last parameter ("value") either writes or changes the value of the key.

Source:

Make sure again that you are calling the existing section and key properly.

Alternatively, you could target the whole section in the .ini file with IniWriteSection():

psydinger is offline  
Old 07/20/2017, 10:25   #3
 
elite*gold: 0
Join Date: Jul 2007
Posts: 219
Received Thanks: 43
Ok thanks for thie. Thats what i were asking for

If i make $Write1 = IniWriteSection("Config.ini","Config","examplecolo r",input1)
It will change last saved value to new one that is in input window right now
owadziak is offline  
Reply




All times are GMT +2. The time now is 13:33.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.