|
我用以下代码打开测试数据
在运行到Set TheFile = Fso.OpenTextFile("c:\Test.txt", ForReading, Flase)这个语句的时候老是报错
麻烦各位帮我看看
Dim Fso, TheFile, ReadString
Dim iPos, iLen
Dim TestNumberOne, TestNumberTwo
Set Fso = CreateObject("Scripting.FileSystemObject")
Set TheFile = Fso.OpenTextFile("c:\Test.txt", ForReading, Flase)
Do while TheFile.AtEndOfLine <>true
ReadString = TheFile.Readline
iPos = instr(1,ReadString,",",1)
iLen = Len(ReadString)
TestNumberOne = left(ReadString, iPos-1)
TestNumberTwo = Right(ReadStrng, iLen-iPos)
Window("计算器").WinButton("TestNumberOne").Click
Window("计算器").WinButton("*").Click
Window("计算器").WinButton("TestNumberTwo").Click
Window("计算器").WinButton("=").Click
Loop
TheFile.Close |
|