我怎么听着这么别扭,难道我的代码和主题差的太远??? 揍下热闹#Include
$_Paht=@SystemDir & "\eula.txt"
Dim $aRecords
If _FileReadToArray($_Paht,$aRecords) Then
$Random=Random(1,$aRecords,1)
MsgBox(0, $Random & " 行",$aRecords[$Random])
Else
...
bing614 发表于 2009-10-15 13:34 http://www.autoitx.com/images/common/back.gif
晕,凑打成揍了........:face (13): 哈哈 眼神还是不错的 我怎么看到都要调用_XXXX的外部函数?AU3里的函数不能直接用吗?
$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
这个很好用啊,谢谢高手们了~
页:
1
[2]