Battery Level

I made a pretty big deal about NPDS enabling you to have a battery-powered web server, so let's prove we're running on batteries. This script returns an unambiguous "Battery: XX %" which should be enough to convince all but the most skeptical visitors..

Name: Battery

SSI: BATTSTAT

func(nullvar)

begin

//This is a really simple script, eh? They don't have to be complicated.

return "Battery:" && NumberStr(BatteryStatus(0).batteryCapacity) & "%";

end