Hello.
I was writing a batch file to make use with a third-party hardware info program used to check the processor's temperature, but while I was writing it, I found a bug with the IF command. Here are a few examples:
C:\Users\CreeperGabe\AppData\Local>if '89.0' LSS '180.0' echo yes
C:\Users\CreeperGabe\AppData\Local>if '128.0' LSS '180.0' echo yes
yes
C:\Users\CreeperGabe\AppData\Local>
-------------------------------------------------------------------------------
C:\Users\CreeperGabe\AppData\Local>if '89.0' GEQ '180.0' echo yes
yes
C:\Users\CreeperGabe\AppData\Local>if '128.0' GEQ '180.0' echo yes
C:\Users\CreeperGabe\AppData\Local>
I've been trying to work around this problem many times, but yet fail. Here is my batch file:
rem if '%1' LEQ '99.9' (
rem goto normal
rem ) else (
'if '%1' LSS '180.0' (
' goto normal
')
if '%1' GEQ '100.0' (
if '%1' LSS '180.0' (
goto normal
) else (
goto alert
)
)
:normal
choice /c QZ /n /cs /t 3 /d Q /m "System is normal at %1øF..."
exit
:alert
title Warning!
echo System is overheating at %1øF! Turn the laptop or tilt it upwards from the left, then press a key.
pause >nul
It's still not finished. Is there an available patch for this that I can install, or anything that will work? This is really 'bug'ging me. I'd love to use QuickBasic for MS-DOS 7.1, but I am running an x64 based system, therefore, I can't. Until I find an
answer, I am going to make it tell me the temperature every 10 minutes.