Platforms to show: All Mac Windows Linux Cross-Platform

WindowsPowerManagerMBS class   New in 25.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Windows MBS WinFrameworks Plugin 25.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Provides access to information about a device's battery and power supply status.
Example
MessageBox str(WindowsPowerManagerMBS.RemainingChargePercent)+"% remaining"

See also WindowsPowerStateMBS class.

Constants

Constant Value Description
EnergySaverStatusOff 1 One of the constants to specify the status of battery saver. Battery saver is off now, but ready to turn on automatically.
EnergySaverStatusOn 2 One of the constants to specify the status of battery saver. Battery saver is on. Save energy where possible.

Battery Status

Constant Value Description
BatteryStatusCharging 3 The battery is charging.
BatteryStatusDischarging 1 The battery is discharging.
BatteryStatusIdle 2 The battery is idle.
BatteryStatusNotPresent 0 The battery or battery controller is not present.

EnergySaver Status

Constant Value Description
EnergySaverStatusDisabled 0 Battery saver is off permanently or the device is plugged in.

Power Supply Status

Constant Value Description
PowerSupplyStatusAdequate 2 The device has an adequate power supply.
PowerSupplyStatusInadequate 1 The device has an inadequate power supply.
PowerSupplyStatusNotPresent 0 The device has no power supply.

This class has no sub classes.

Blog Entries

Release notes

Some related classes:


The items on this page are in the following plugins: MBS WinFrameworks Plugin.


WindowsPlayerMBS   -   WindowsPowerStateMBS


The biggest plugin in space...