only a small queston: whats wrong in my code??
Code: Select all
IniRead, string_to, C:\XX\auto_replace.ini, Section1, replace_to
string_to := StrReplace(string_to, "A", "B")
IniWrite % string_to, C:\XX\auto_replace.ini, Section1, replace_to
Thanks
Code: Select all
IniRead, string_to, C:\XX\auto_replace.ini, Section1, replace_to
string_to := StrReplace(string_to, "A", "B")
IniWrite % string_to, C:\XX\auto_replace.ini, Section1, replace_to
Code: Select all
MsgBox, % string_to
Code: Select all
MsgBox, % "Ini file " . (FileExist("C:\XX\auto_replace.ini") ? "found" : "not found")
Code: Select all
[Section1]
replace_from=text_from
replace_to=text_to
Code: Select all
/*
[Section1]
replace_to=1AAAAAA2
*/
IniRead, string_to, % A_ScriptName, Section1, replace_to
MsgBox % string_to := StrReplace(string_to, "A", "B")
IniWrite % string_to, % A_ScriptName, Section1, replace_to
; check your scripts "ini section" for changes, probably you've to "refresh" the open file with pushing F5!
Code: Select all
IniRead, string_to, C:\XX\auto_replace.ini, Section1, replace_from
string_to := StrReplace(string_to, "A", "B")
IniWrite % string_to, C:\XX\auto_replace.ini, Section1, replace_to