举报
揍下热闹#Include $_Paht=@SystemDir & "\eula.txt" Dim $aRecords If _FileReadToArray($_Paht,$aRecords) Then $Random=Random(1,$aRecords[0],1) MsgBox(0, $Random & " 行",$aRecords[$Random]) Else ... bing614 发表于 2009-10-15 13:34
$vfile = "新建 文本文档.txt" $nRandomLine = Random(1,nReadLine($vfile),1) MsgBox(0,"第"&$nRandomLine&"的内容是",FileReadLine($vfile,$nRandomLine)) Func nReadLine($Val) $file = FileOpen($Val, 0) $xTemVal=0 While 1 $line = FileReadLine($file) $xTemVal = $xTemVal + 1 If @error = -1 Then ExitLoop Wend FileClose($Val) return $xTemVal EndFunc
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-3-1 07:22 , Processed in 0.073549 second(s), 13 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.