新手求助 vbs替换文字
if WScript.Arguments.Count <> 0 ThenmyFile = Wscript.Arguments(0)
else
SET oFO = CreateObject("SAFRCFileDlg.FileOpen")
oFO.OpenFileOpenDlg
myFile = oFO.FileName
end if
strOld = InputBox("输入T001:")
if Len(Trim(strOld)) = 0 then Wscript.Quit
strNew = InputBox("输入修改的套账格式为TXXX:")
if Len(Trim(strNew)) = 0 then Wscript.Quit
with CreateObject("Scripting.FileSystemObject")
SET FILE = .OpenTextFile(myFile,1,true)
fStr = FILE.Readall
FILE.Close
fStr = Replace(fStr,strOld,strNew,1,999999999)
SET FILE = .OpenTextFile(myFile,2,true)
FILE.Write fStr
end with
我想修改成能够替换两个的代码,还有就是第一次的能不能不用输入直接设置成我想要的默认字符啊