• 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
is the ouput of this script accurate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

is the ouput of this script accurate?


  • Subject: is the ouput of this script accurate?
  • From: 2551 <email@hidden>
  • Date: Thu, 16 Apr 2015 00:35:14 +0700

Hi List


A user has asked me to provide a script that will monitor the battery level of  Apple bluetooth devices (keyboard, magic trackpad, mouse).

I looked at the bluetooth.framework api but didn't find anything obvious. However, a bit of googling threw up some ioreg shell commands. My problem is that while this approach returns results consistent with what is reported in my System Prefs and Bluetooth Status bar menu for both my trackpad and magic mouse, it doesn't do so for my keyboard. The Status bar menu has my keyboard at 80% while ioreg reports it at a significantly lower 45%.

Since I only have one keyboard, I can't test whether this is a problem with my device. I'd be grateful if any of you could confirm whether the following script outputs a BatteryPercent the same as that shown in your Bluetooth status bar menu (or Bluetooth sysetem prefs). 

do shell script "ioreg -c AppleBluetoothHIDKeyboard | grep BatteryPercent"


TIA 


Phil
 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: is the ouput of this script accurate?
      • From: Shane Stanley <email@hidden>
    • Re: is the ouput of this script accurate?
      • From: Robert Poland <email@hidden>
  • Prev by Date: Re: OS 10.2.3 Applescript Editor gone.
  • Next by Date: Re: Why does opening any script editor open many other apps?
  • Previous by thread: Re: Amazon AWS REST for S3 Multipart Uploads
  • Next by thread: Re: is the ouput of this script accurate?
  • Index(es):
    • Date
    • Thread