找回密码
 加入
搜索
楼主: dearmb

[AU3基础] 脚本关闭的时候,提示“错误的数组或者数组超出界限”

  [复制链接]
 楼主| 发表于 2012-2-17 08:25:53 | 显示全部楼层
各位能不能看看我的代码再回答
我点X关闭脚本的代码,没有特定数组元素的数量,都是变量
                        $aChild = _WinAPI_EnumChildProcess(@AutoItPID)
                        If @error Then
                        $aProc=processlist()
                        $aRes = _ArrayFindAll($aProc, 'xcopy', 0 , 0 , 0 , 1)
                        $proces_sum=ubound($aRes)                ;读取xcopy.exe 的进程数组(包含xcopy字母的exe进程数)
                        if $proces_sum > 0 Then
                        For $i=1 To $proces_sum
                        ProcessClose($aProc[$aRes[$i]][1])
                        next
                        EndIf
                                Exit
                        Else
                                If $aChild[0][0] <> 0 Then
                                        For $i = 1 To $aChild[0][0]
                                                ProcessClose($aChild[$i][0])
                                        Next
                                       
                        $aProc=processlist()
                        $aRes = _ArrayFindAll($aProc, 'xcopy', 0 , 0 , 0 , 1)
                        $proces_sum=ubound($aRes)                ;读取xcopy.exe 的进程数组(包含xcopy字母的exe进程数)
                        if $proces_sum > 0 Then
                        For $i=1 To $proces_sum
                        ProcessClose($aProc[$aRes[$i]][1])
                        next
                        endif
                                EndIf
                                Exit
                        EndIf
 楼主| 发表于 2012-2-19 13:01:31 | 显示全部楼层
呃……没人帮忙吗……
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-20 18:46 , Processed in 0.069181 second(s), 14 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表