QB64.org Forum
Active Forums => Programs => Topic started by: Richard Frost on December 18, 2021, 02:40:19 am
-
1) delete the first line if you don't download the icon file
2) needs liberati.ttf, a font that used to be included with QB64
3) works as is with XP, requires running as administrator in 10
q$
= Chr$(34) ' quote character
Print #1, "for /f " + q$
+ "skip=1 tokens=2 delims==" + q$
+ " %%A in ('wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature /value') do set /a " + q$
+ "HunDegCel=(%%~A*10)-27315" + q$
Print #1, "echo %HunDegCel:~0,-2%.%HunDegCel:~-2% Degrees Celsius"
-
cpu_temp.bat
@ wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature
@ pause
CurrentTemperature
3262
3030
Kelvin