复制代码 代码如下:
randomize
set fso=createobject("scripting.filesystemobject")
set a=createobject("scripting.dictionary")
set file=fso.opentextfile("a.txt")
do while file.atendofstream>true
m=m+1
a.add m,file.readline
loop
file.close
h=int(rnd*m)
msgbox "第" h "行: " a(h) ,4096,"随机内容"