Because LC can't do two things at once.

Bob Sneidar bobsneidar at
Mon Feb 23 14:12:09 EST 2015

Okay so two commands you can use:

shell("WMIC Path Win32_Battery GetAvailability”) will tell you if the battery is charging or not, and I suspect if you are able to remove the battery, it will give you something else. 

shell("WMIC Path Win32_Battery EstimatedChargeRemaining”) will give you 99 if fully charged, and something less than that if not. 

Bob S

> On Feb 23, 2015, at 09:08 , Bob Sneidar <bobsneidar at> wrote:
> Okay I think I have found a way to get the battery status. I checked it on my VM of Windows 7. Your results may vary. 
> Try shell("WMIC Path Win32_Battery Get Availability”)
> Line 3 will contain 2 if the battery is charging, 3 if running on battery, and I am going to say 1 if the battery is fully charged. I’ll have to check that later as my battery is currently charging at the moment. 
> Now for the teaching moment: WMIC can give you just about any information you want about the hardware you are running on. Spiceworks Inventory and Helpdesk system makes extensive use of WMIC when querying Windows devices. 
> Bob S

More information about the Use-livecode mailing list