|
发表于 2023-11-8 10:17:59
|
显示全部楼层
|
- _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 秒
复制代码
|
|