bing614 发表于 2009-10-15 18:09:44

15# sxd


我怎么听着这么别扭,难道我的代码和主题差的太远???

bing614 发表于 2009-10-15 18:10:58

揍下热闹#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):

sxd 发表于 2009-10-15 18:56:09

哈哈 眼神还是不错的

newx 发表于 2009-10-16 01:52:26

我怎么看到都要调用_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

ollydbg 发表于 2009-10-18 12:23:38

这个很好用啊,谢谢高手们了~
页: 1 [2]
查看完整版本: 高手解决下,如何随机取.txt某行值