dim fso
const forreading=1,forwriting=2,forappending=8
set fso=createobject("scripting.filesystemobject")
dim txtpath
txtpath="d:\log.txt"
fso.opentextfile txtpath,8,true
'call qtp_writetxt(txtpath,"woshi")
call qtp_writetxt2(txtpath,"1233")
public function qtp_writetxt(opath,words)
dim fso
set fso=createobject("scripting.filesystemobject")
set logfile=fso.opentextfile(opath,8,true)
logfile.writeline(cstr(words))
logfile.close
set logfile=nothing
set fso=nothing
end function
public function qtp_writetxt2(opath,words)
dim fso
set fso=createobject("scripting.filesystemobject")
set logfile=fso.opentextfile(opath,2,true)
logfile.writeline(cstr(words))
logfile.close
set logfile=nothing
set fso=nothing
end function