• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting battery state?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting battery state?


  • Subject: Re: Getting battery state?
  • From: Mark Butcher <email@hidden>
  • Date: Mon, 17 Mar 2003 07:51:34 -0800

Curious. On my PowerBook G3, I get:

"Voltage=0
Flags=1
Amperage=0
Capacity=0
Current=0"

But my battery is 100%. So how come I get all these zeros?

MarkB


On Monday, Mar 17, 2003, at 06:31 US/Pacific, bill wrote:

Is it possible to get the state of the battery on a iBook/PowerBook?
Either directly in AS, or via do shell script...

Interesting timing, last night I tried this one:

do shell script "ioreg -p IODeviceTree -n battery -w 0 | grep IOBatteryInfo
| cut -d'{' -f2 | cut -d'}' -f1 | tr -d '\"' | tr , '\n'"

-- "Voltage=0
Flags=131
Amperage=1200
Capacity=10000
Current=0"

Hope it suits your desire.


bill
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Getting battery state?
      • From: bill <email@hidden>
References: 
 >Re: Getting battery state? (From: bill <email@hidden>)

  • Prev by Date: Re: left or right page in quark
  • Next by Date: Re: "cd " and "tail -f" on a file
  • Previous by thread: Re: Getting battery state?
  • Next by thread: Re: Getting battery state?
  • Index(es):
    • Date
    • Thread