本帖最后由 gzh888666 于 2019-1-21 13:54 编辑 Global Const $myFile = "D:\桌面\测试.txt"
Example($myFile, '<setting name="agc_mode" value="1"/>', '<setting name="agc_mode" value="0"/>')
Example($myFile, '<setting name="echo_control" value="0"/>', '<setting name="echo_control" value="1"/>')
Example($myFile, '<setting name="noise_suppression" value="0"/>', '<setting name="noise_suppression" value="1"/>')
Func Example($File, $1, $2)
Local $sFileRead = StringReplace(FileRead($File), $1, $2)
Local $hFileOpen = FileOpen($File, 2)
FileWrite($hFileOpen, $sFileRead)
FileClose($hFileOpen)
EndFunc ;==>Example
|