• 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: Battery or AC?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Battery or AC?


  • Subject: Re: Battery or AC?
  • From: "John C. Welch" <email@hidden>
  • Date: Fri, 03 Nov 2006 09:19:45 -0600
  • Thread-topic: Battery or AC?

On 11/3/06 08:57, "Mark J. Reed" <email@hidden> wrote:

> It looks like pmset is still the way to manage and query the profiles, but it
> seems to have no way of directly determining which one is active. You can do a
> "pmset -g disk", parse out the settings for both battery and AC power, and
> then do a "pmset -g live" and see which set of values matches.. Yuck.

In Mac OS X 10.4 there is.

on AC:

Battery Power           -1
AC Power                -1*

On Battery:

Battery Power           -1*
AC Power                -1

So the quick way, from what I see, is to look for the first word of the line
containing an asterisk, which is Battery or AC. (Since laptops are rarely
directly on UPS's, I'm not too worried about that edge case)

--
"Our users will know fear and cower before our software.  Ship it!  Ship it
and let them flee like the dogs they are!"

- 1st most commonly uttered Klingon programmer phrase


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Battery or AC?
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: Battery or AC? (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Property and variable
  • Next by Date: Re: Battery or AC?
  • Previous by thread: Re: Battery or AC?
  • Next by thread: Re: Battery or AC?
  • Index(es):
    • Date
    • Thread