按键精灵吧 关注:500,100贴子:1,025,764
  • 0回复贴,共1

[发源码] 逐行读取.TXT文本内容

只看楼主收藏回复

VBS Dim fso,ts,text
VBS Const ForReading = 1
VBS Set fso = CreateObject("Scripting.FileSystemObject")
VBS Set ts = fso.OpenTextFile("e:\a.txt", ForReading)
Rem a1
VBS test=ts.ReadLine
if test=""
     Goto a2
endif
MessageBox test
VBS SkipLine
Delay 1000
Goto a1
Rem a2
VBS ts.Close
忘了关闭了,抱歉,读完只要把 VBS ts.Close 加在后面就行了!


IP属地:广东1楼2010-06-20 02:09回复