netegg Posted June 13, 2010 Posted June 13, 2010 Is it possible to get the hardware temperature by api?
Igzter Posted June 13, 2010 Posted June 13, 2010 Is it possible to get the hardware temperature by api?Well - it would be helpful if you specified which hardware temp (CPU, PSU or other device?). What it boils down to is it all depends.
Igzter Posted June 13, 2010 Posted June 13, 2010 Is it possible to get the hardware temperature by api? If you are looking for the CPU external temperature you can query WMI for informatio (ACPI). I use my own iWMILib but as you can see from the example below its a standard WMI query using WQL (just using my lib to excuse myself of writing all additional support code). http://www.autoitscript.com/forum/index.php?showtopic=115733 (iWMILib) Hope this helps you somewhat.. Ig #NoTrayIcon #include <iWMILib.au3> _iWMI_Initialize() $iConnection = _iWMI_Connect("localhost",0,"","", "root\WMI" ) ; Assume you have privs to execute the query if @error Then ConsoleWrite("Error!" & @CRLF ) EndIf $cObjects = _iWMI_ExecQueryRaw( $iConnection, "SELECT * FROM MSAcpi_ThermalZoneTemperature", False ) if @error Then ConsoleWrite("Error!" & @CRLF ) EndIf For $oObject In $cObjects $temperature = ( $oObject.CurrentTemperature - 2732.0) / 10.0 ; Convert to Celsius from 0.1 Kelvins $critical = ( $oObject.CriticalTripPoint - 2732.0) / 10.0 ; Convert to Celsius from 0.1 Kelvins ConsoleWrite( $temperature & @CRLF ) ConsoleWrite( $critical & @CRLF ) Next
Uwe Posted January 15, 2011 Posted January 15, 2011 This script shows the temperature in the system tray UweThermoCPU.au3
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