_dxdiag()
Func _dxdiag()
$File = @TempDir & "\dxdiag.txt"
Local $a = FileOpen($File, 0), $i = 1
If FileExists($File) Then
Local $sDelimiter = "DirectX Version:"
Else
Local $sDelimiter = "DirectX Version:"
RunWait(@ComSpec & " /c dxdiag.exe /t " & $File & "", "", @SW_HIDE)
EndIf
While 1
Local $hs = FileReadLine($a)
If @error Then ExitLoop
If StringRegExp($hs, $sDelimiter) Then
ExitLoop
EndIf
$i += 1
$line = StringStripWS(FileReadLine($File, $i),4)
$location = StringReplace($line, $sDelimiter,"",0,0)
WEnd
FileClose($a)
MsgBox(0, $line, "" & $location)
Return $location
EndFunc ;==>_dxdiag
_VRAM()
Func _VRAM()
Local $File = @TempDir & "\dxdiag.txt"
If FileExists($File) Then
Local $sDelimiter = "Dedicated Memory:"
Else
Local $sDelimiter = "Dedicated Memory:"
RunWait(@ComSpec & " /c dxdiag.exe /t " & $File & "", "", @SW_HIDE)
EndIf
Local $a = FileOpen($File, 0), $i = 1
While 1
Local $hs = FileReadLine($a)
If @error Then ExitLoop
If StringRegExp($hs, $sDelimiter) Then
ExitLoop
EndIf
$i += 1
$line2 = StringStripWS(FileReadLine($File, $i),4)
$location2 = StringReplace($line2, $sDelimiter,"",0,0)
WEnd
FileClose($a)
MsgBox(0, $line2, "" & $location2)
Return $location2
EndFunc ;==>_VRAM
以上win10运行出错。
请教,win10运行错误,麻烦大佬给优化改正一下。非常感谢。
首次运行也出错。>"D:\autoit3\SciTE\ACNWrapper\ACNWrapper.exe" /run /ErrorStdOut /in "H:\AU3\DirectX版本显卡内存.au3" /autoit3dir "D:\autoit3" /UserParams
+>10:17:12 开始执行 ACNWrapper v.1.0.3.1
+> ============================================
+>执行环境:
+> CPU构架: X64
+> 系统构架: X64
+> 系统语言: 0804
+> 键盘布局: 00000804
+> 内存总量: 16317MB
+> 内存剩余: 14482MB
+> 操作系统: WIN_7/Service Pack 1
+> AU3版本: 3.3.9.21
+> ============================================
>运行 AU3Check (3.3.9.21) 开始目录:D:\autoit3
+>10:17:12 AU3Check 完成[CODE]:0
>运行:(3.3.9.21):D:\autoit3\autoit3_x64.exe "H:\AU3\DirectX版本显卡内存.au3"
"H:\AU3\DirectX??????.au3" (23) : ==> Variable used without being declared.:
MsgBox(0, $line, "" & $location)
MsgBox(0, ^ ERROR
->10:17:13 AutoIt3.exe 完成:[CODE]:1
+>10:17:13 ACNWrapper 完成..
>退出代码: 1 运行时间: 1.116 秒
|