:repeat
Goto get-battery
Echo "%Ba%"
:Next
Goto get-battery
Echo "%Ba%"
:Next
TIMEOUT /T 600
if "%Ba%" GEQ "80" Goto Alert
goto repeat
:Alert
echo Your battery has finished charging
if "%Ba%" GEQ "80" Goto Alert
goto repeat
echo Your battery has finished charging
for /f "tokens=2 delims==" %%E in ('wmic path Win32_Battery get EstimatedChargeRemaining /value') do (set "Ba=%%E")
Goto Next
Save the above code in a .bat file. Place this file in startup (shell:startup)
No comments:
Post a Comment