本帖最后由 apang 于 2013-5-12 18:25 编辑
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set file = fso.OpenTextFile("a.txt")
- Randomize()
- Do Until file.AtEndOfStream
- a = file.ReadLine
- arr = Split(Right(a,Len(a)-InStr(a,"=")),",")
- str = str & arr(Int(Rnd * (UBound(arr) + 1))) & vbLf
- Loop
- WScript.Echo str
复制代码
|