Re: Battery or AC?
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