脚本专栏 发布日期:2024/12/30 浏览次数:1
复制代码 代码如下:
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,"随机内容"