Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
CLEAR
LOCAL BStatus AS String
TEXT TO m.BStatus NOSHOW
:1:Discharging:
:2:Connected to AC:
:3:Fully charged:
:4:Low:
:5:Critical:
:6:Charging:
:7:Charging and high:
:8:Charging and low:
:9:Charging and critical:
:10:Undefined:
:11:Partially charged:
ENDTEXT
LOCAL WMIService, AllBatteries, Battery
m.WMIService = GETOBJECT("winmgmts:\\.\root\cimv2")
m.AllBatteries = m.WMIService.ExecQuery("SELECT * FROM Win32_Battery",,48)
FOR EACH m.Battery IN m.AllBatteries
? "Battery status:", STREXTRACT(m.BStatus, TEXTMERGE(":<<m.Battery.BatteryStatus>>:"), ":")
? "Charged at", TRANSFORM(m.Battery.EstimatedChargeRemaining), "%"
ENDFOR