FuryCell Posted August 29, 2009 Posted August 29, 2009 (edited) To use this demo place GPU-Z in same folder as the script and name it GPUZ.exe.If there is interest I might update these udfs and make them more documented.expandcollapse popup#Include<Array.au3> $GPUZ= _GPUZInit(@ScriptDir&"\gpuz.exe") $Data=_GPUZGetData($GPUZ) _ArrayDisplay($Data) _GPUZClose($GPUZ) Func _GPUZInit($Path) Local $Ret[2] $Ret[0]=Run($Path,@ScriptDir,@SW_HIDE) WinWait("TechPowerUp GPU-Z") $Ret[1]=WinGetHandle("TechPowerUp GPU-Z") Return $Ret EndFunc Func _GPUZClose($GPUZ) Processclose($GPUZ[2]) EndFunc Func _GPUZGetData($GPUZ,$Item=-1) Switch $Item Case -1 Dim $Array[9][2] $Array[0][0]=ControLGetText($GPUZ[1],"","Static65") $Array[0][1]=ControLGetText($GPUZ[1],"","Static66") $Array[1][0]=ControLGetText($GPUZ[1],"","Static68") $Array[1][1]=ControLGetText($GPUZ[1],"","Static69") $Array[2][0]=ControLGetText($GPUZ[1],"","Static71") $Array[2][1]=ControLGetText($GPUZ[1],"","Static72") $Array[3][0]=ControLGetText($GPUZ[1],"","Static74") $Array[3][1]=ControLGetText($GPUZ[1],"","Static75") $Array[4][0]=ControLGetText($GPUZ[1],"","Static77") $Array[4][1]=ControLGetText($GPUZ[1],"","Static78") $Array[5][0]=ControLGetText($GPUZ[1],"","Static77") $Array[5][1]=ControLGetText($GPUZ[1],"","Static78") $Array[6][0]=ControLGetText($GPUZ[1],"","Static80") $Array[6][1]=ControLGetText($GPUZ[1],"","Static81") $Array[7][0]=ControLGetText($GPUZ[1],"","Static83") $Array[7][1]=ControLGetText($GPUZ[1],"","Static84") $Array[8][0]=ControLGetText($GPUZ[1],"","Static86") $Array[8][1]=ControLGetText($GPUZ[1],"","Static87") $Array[8][0]=ControLGetText($GPUZ[1],"","Static89") $Array[8][1]=ControLGetText($GPUZ[1],"","Static90") Case Else Dim $Array[2] $Array[0]=ControLGetText($GPUZ[1],"","Static"&62+3*$Item) $Array[1]=ControLGetText($GPUZ[1],"","Static"&63+3*$Item) EndSwitch Return $Array EndFunc Edited September 11, 2009 by P5ych0Gigabyte HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
MartiniThePilot Posted September 4, 2009 Posted September 4, 2009 Hi, nice idea - would fit my needs. I guess, the first lines of the posted source code are missing (#includes), I get the following error: GetGpuZ.au3(3,20) : ERROR: _ArrayDisplay(): undefined function. Any chance, you post the complete source? Thanx, Martini
FuryCell Posted September 11, 2009 Author Posted September 11, 2009 Hi,nice idea - would fit my needs. I guess, the first lines of the posted source code are missing (#includes), I get the following error: GetGpuZ.au3(3,20) : ERROR: _ArrayDisplay(): undefined function.Any chance, you post the complete source?Thanx, Martinithanks for finding that. I just fixed it now. It was missing a line to include array.au3. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
MartiniThePilot Posted September 11, 2009 Posted September 11, 2009 Hi P5ych0Gigabyte, yes, thanks - found that myself...though that probably more code is missing. Some remarks: When I run your script several times, I get an error message box from GPU-z saying "Driver marked for delete, can't be loaded". I found, that GPU-z is not terminated correctly. When starting GPU-z in function _GPUZInit you put the PID into $Ret[0], but uses $GPUZ[2] on Processclose in _GPUZClose, which gives an "Array subscript out of range error". After changing that to $GPUZ[0], GPU-z is terminated correctly and the error on repetitive calls of your script is gone. Func _GPUZClose($GPUZ) Processclose($GPUZ[0]) EndFunc When I ran that on my Laptop with mobile Ati graphics card, the values shown in the array are probably not the values you want to be there (though there are not incorrect, some of the values (L1800) are the values of the Monitor and not of the graphics card). Attached some screen shoots for reference - if you like. Ciao, Martini
FuryCell Posted September 11, 2009 Author Posted September 11, 2009 Hi P5ych0Gigabyte, yes, thanks - found that myself...though that probably more code is missing. Some remarks: When I run your script several times, I get an error message box from GPU-z saying "Driver marked for delete, can't be loaded". I found, that GPU-z is not terminated correctly. When starting GPU-z in function _GPUZInit you put the PID into $Ret[0], but uses $GPUZ[2] on Processclose in _GPUZClose, which gives an "Array subscript out of range error". After changing that to $GPUZ[0], GPU-z is terminated correctly and the error on repetitive calls of your script is gone. Func _GPUZClose($GPUZ) Processclose($GPUZ[0]) EndFunc When I ran that on my Laptop with mobile Ati graphics card, the values shown in the array are probably not the values you want to be there (though there are not incorrect, some of the values (L1800) are the values of the Monitor and not of the graphics card). Attached some screen shoots for reference - if you like. Ciao, Martini I guess GPU-Z is unpredictable with the naming of controls. There is a way to make GPU-Z dump to xml i think im gonna change the functions to read xml. It just sucks that its writing a file to the hd so if u wanted to read in real time it would be really slow. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now