moyi20 发表于 2012-12-26 22:51:53

_WinAPI_GetDriveNumber函数示例有错误变量

错误提示的全部内容>"E:\Program Files (x86)\autoit3\SciTe\ACNWrapper\ACNWrapper.exe" /run /ErrorStdOut /in "E:\Program Files (x86)\autoit3\Examples\WinAPIEx\_WinAPI_GetDriveNumber.au3" /autoit3dir "E:\Program Files (x86)\autoit3" /UserParams   
+>22:42:03 开始执行 ACNWrapper v.1.0.1.7
+> ============================================
+>执行环境:
+>        CPU构架:        X64
+>        系统构架:        X64
+>        系统语言:        0804
+>        键盘布局:        00000804
+>        内存总量:        6142MB
+>        内存剩余:        3643MB
+>        操作系统:        WIN_7/Service Pack 1
+>        AU3版本:        3.3.9.4
+> ============================================
>运行 AU3Check (3.3.9.5)开始目录:E:\Program Files (x86)\autoit3
+>22:42:03 AU3Check 完成:0
>运行:(3.3.9.4):E:\Program Files (x86)\autoit3\autoit3_x64.exe "E:\Program Files (x86)\autoit3\Examples\WinAPIEx\_WinAPI_GetDriveNumber.au3"   
"E:\Program Files (x86)\autoit3\Examples\WinAPIEx\_WinAPI_GetDriveNumber.au3" (9) : ==> ???????????????????.:
$List[$i] = ''
^ ERROR
->22:42:03 AutoIT3.exe 完成::1
+>22:42:05 ACNWrapper 完成..
>退出代码: 1        运行时间: 2.425 秒
示例的全部内容#Include <WinAPIEx.au3>

Opt('MustDeclareVars', 1)

Global $Data, $Drive = DriveGetDrive('FIXED')
Global $List

For $i = 0 To UBound($Drive) - 1
    $List[$i] = ''
Next
If IsArray($Drive) Then
    For $i = 1 To $Drive
      $Data = _WinAPI_GetDriveNumber($Drive[$i])
      If IsArray($Data) Then
            $List[$Data] &= StringUpper($Drive[$i]) & ' '
      EndIf
    Next
EndIf
For $i = 0 To UBound($Drive) - 1
    If $List[$i] Then
      ConsoleWrite('Drive' & $i & ' => ' & $List[$i] & @CR)
    EndIf
Next

annybaby 发表于 2012-12-26 23:11:33

回复 1# moyi20


   表示无压力~~
>运行:(3.3.8.1):E:\autoit3\autoit3.exe "E:\autoit3\Examples\WinAPIEx\_WinAPI_GetDriveNumber.au3"   
Drive0 => C: E: F: X:
Drive1 => D: G: I:
+>23:10:26 AutoIT3.exe 完成::0
+>23:10:28 ACNWrapper 完成..
>退出代码: 0        运行时间: 6.384 秒

moyi20 发表于 2012-12-26 23:16:49

回复 2# annybaby


    难道是版本问题,,我才安装的3.3.9.4,
删除了$List[$i] = ''得到如下>运行 AU3Check (3.3.9.5)开始目录:E:\Program Files (x86)\autoit3
+>23:14:50 AU3Check 完成:0
>运行:(3.3.9.4):E:\Program Files (x86)\autoit3\autoit3_x64.exe "E:\Program Files (x86)\autoit3\Examples\WinAPIEx\_WinAPI_GetDriveNumber.au3"   
Drive0 => C: D: E: F:
Drive1 => G: H: I: J:
Drive4 => P: Q:
"E:\Program Files (x86)\autoit3\Examples\WinAPIEx\_WinAPI_GetDriveNumber.au3" (19) : ==> ???????????????????.:
If $List[$i] Then
If ^ ERROR
->23:14:50 AutoIT3.exe 完成::1
+>23:14:51 ACNWrapper 完成..
>退出代码: 1        运行时间: 2.443 秒感觉还是有地方不对

moyi20 发表于 2012-12-26 23:37:15

我上一版本没问题,,可惜 上一个版本的安装文件被我删过了。。>运行 AU3Check (1.54.23.0)开始目录:D:\autoit3
+>23:35:34 AU3Check 完成:0
>运行:(3.3.9.0):D:\autoit3\autoit3_x64.exe "C:\Users\moyi20\Documents\1.au3"   
Drive0 => C: D: +>23:35:35 AutoIT3.exe 完成::0
+>23:35:36 ACNWrapper 完成..
>退出代码: 0        运行时间: 2.159 秒
页: [1]
查看完整版本: _WinAPI_GetDriveNumber函数示例有错误变量