|
本帖最后由 iori2882 于 2012-4-5 19:12 编辑
随机出现的,有的时候测试几十遍也不出错 有的时候突然一下就出现这个错误 错误代码在34行
H:\??????\??????\AU3(????)\????\appleworm\ceshi.au3 (62) : ==> ???????????.:
$lu2 = $aRecords[$j]
$lu2 = $aRecords^ ERROR$bendiread = IniRead(@ScriptDir & "\更新配置文件.ini", "更新配置文件", "版本号", "nofound");读取本机版本号
If $ftpwenjianzhuan <> $bendiread Or $bendiread = "nofound" Then
#region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("对话框", 311, 331, 386, 283)
$Button1 = GUICtrlCreateButton("确定(O)", 25, 299, 75, 25)
$Button2 = GUICtrlCreateButton("取消(C)", 186, 299, 75, 25)
$Progress1 = GUICtrlCreateProgress(8, 176, 297, 17)
$Pic1 = GUICtrlCreatePic(@ScriptDir & "\image\1.jpg", 6, 0, 297, 139)
$Group1 = GUICtrlCreateGroup("", 8, 142, 297, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Edit2 = GUICtrlCreateEdit("", 8, 200, 297, 97)
GUICtrlSetData(-1, "Edit2")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
;===========================================================更新内容=====================================
GUICtrlSetData($Edit2, "日常更新:" & @CRLF & "1:更新号码" & @CRLF & "2:更新")
;===========================================================读取下载文件路径=============================
DirCreate("C:\WINDOWS\temp\Cookies")
$ftpinger = InetGet("ftp://admin:ioriyagami@192.168.88.4/soft/更新配置/更新路径.txt", "C:\WINDOWS\temp\Cookies\更新路径.txt", 1, 1)
InetClose($ftpinger)
Local $CountLines = _FileCountLines("C:\WINDOWS\temp\Cookies\更新路径.txt");总行
Dim $aRecords
$1how = _FileReadToArray("C:\WINDOWS\temp\Cookies\更新路径.txt", $aRecords)
;$xx=$aRecords[0];总行数
Local $open = _FTP_Open("myftp")
Local $ftplian = _FTP_Connect($open, $sever, $name, $password)
$i = 1
$j = 2
$k = 1
While $i < $CountLines And $j < $CountLines + 1
$lu2 = $aRecords[$j];这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里这里
If FileExists(@ScriptDir & $lu2) Then
FileDelete(@ScriptDir & $lu2)
EndIf
$bianfile = InetGet($aRecords[$i], @ScriptDir & $lu2, 1, 1)
Sleep(50)
$weizhi = "\soft\appleworm" & $aRecords[$j]
$xiasize = _FTP_FileGetSize($ftplian, $weizhi)
Do
$ftpjisuan1 = InetGetInfo($bianfile, 0)
$ftpjisuan2 = ($ftpjisuan1 / $xiasize) * 100
$ftpjisuan3 = Ceiling($ftpjisuan2)
Sleep(1000)
GUICtrlSetData($Progress1, $ftpjisuan3)
GUICtrlSetData($Group1, "正在更新第" & $k & "组文件 进度为:" & $ftpjisuan3 & "%")
Until InetGetInfo($bianfile, 2);检查下载是否完成.
InetClose($bianfile);关闭句柄, 释放资源.
GUICtrlSetData($Progress1, "100")
GUICtrlSetData($Group1, "正在更新第" & $k & "组文件 进度为:100%")
$k = $k + 1
$i = $i + 2
$j = $j + 2
WEnd
FileDelete(@ScriptDir & "\更新配置文件.ini")
$cl = InetGet($ftppeizhilujing1, @ScriptDir & "\更新配置文件.ini");改到下面
InetClose($cl)
EndIf
连字符 & 不能连接数组的吧? 所以我给个赋值$lu2 = $aRecords[$j] 到底为什么会出现上面的提示呢? |
评分
-
查看全部评分
|