Question about an AppleScript for speaking battery status
I have a new MacBook pro 2017 OSX High Sierra and want to set up the battery status apple script commander.
I have seen the one crested by Bryan Smart however I Ama unsure if this will still work with the new software as the script was created a while back?
Also I am wondering if there would be another way to have a shortcut for the battery status ? I have the touchbar MacBook so I am wondering if there would be any commander I could add for a batery and power status to the touchbar?
Please kindly advise
Hi! There is a shurt ccut for read the time. In order to use that you need to activate the keybord commander. To activate this open VO utiliteas, in commanders looking for “keybord commander” there, mark the check box “ “activate keybord commander” the right option use as a keybord commander, press on him with T will read the time and date.
Thank you for your reply. I already have the time and date commander activated but I was referring to a battery ,status and power status commander.
To the OP and anyone curious, the scripts from Brian Smart still work just fine on my MBP running 10.13.
Oh thank you Brian ! I am a bit worried they might have stopped working.
I will try install and activate the battery one.
Is it difficult to set up I’ve never done it before ?
Btw are you Brian Smart?
First, no I am not "that" Brian.
Second, To setup the script do the following:
• Open VO Utility (vo + F8 or vo+ FN + F8) dependent on your Mac and/or keyboard settings.
• Navigate to Commanders, then Keyboard commander.
• vo + right arrow over to "Add" (making sure KB commander is enabled).
• Type a letter for your hotkey (I use a lower case 'b').
• vo + right arrow once, then vo + space on 'menu button'.
• Down arrow to 'custom commands', then right arrow once, then down arrow again until you hear 'Run AppleScript script...'.
• vo + space on this, then navigate to wherever you have the .script file.
• Press enter to select the file.
• That should do it.
Will this battery status script command work on a MacBook air 2015?
Thank you in advance for your reply.
I've never been used the script you mentioned above. I wrote one for myself. It utilizes the command line command:
pmset -g batt
It works fine on High Sierra.
It should work on your MacBook Air as it was created in 2015. I guess it’s just a commander so prob works regardless of the software you run.
You can always try it.
I couldn’t find the Apple scripts folder - I am in the library section is it called application scripts that’s the only one I can see? Do I need to make a new folder in the application script folder for the battery commander??
Please let me know
I found the Library scripts folder. It didn’t have any folders in it so I put it in there.
However when I went to the add commander section I pressed the run apple script a script folder came up it had a few folders in there but not the script I put in there?
It had a VO folder in there as well so how to get the script to show?
Please kindly post steps
thank you for that information that is what I have dine but my script folder is not behaving itself and its not showing the script I added,
im getting help from apple to get it sorted but I assigned it from recent files and it seems to be working.
only thing is some of my menu extras disappeared after this e.g. volume control , airplay etc I don't know how to get them back?
Your scripts should be in the following directory:
Inside this 'scripts' folder are several folders with applescripts within. There is even a VoiceOver folder with the default applescripts/keyboard commander scripts inside.
Now, you. do. not. have. to. put. scripts. here, its just the default directory..
If you are having issues with missing directories, then that is above my pay grade.
Thank you I have been trying to figure out why the stupid script wasn't showing up in the commander assignment window all day. The apple team would not support me as they don't help with Scripting issues. I just wanted to find the right place.
I am a new Mac user only had it for a few weeks so my Mac HD drive was hidden thats why I was putting it in the wrong library script folder!
All good now I've put it in the correct place and works great!
Thank you so much :)
When on the Finder/Desktop, remember the following hotkey:
CMD + Shift + c (as in Charlie)
This will open "username's" computer directory, which is where you can always find Macintosh HD as well as a host of other directories.
Also, while on your Desktop, you may want to study your menu bar (which is at the top typically).
vo + m (as in Mike) to access, then right arrow to 'Go', then down arrow and just study those hotkeys. They make using a Mac "dreamy" !! :-)
Thank you for the advice and shortcuts. It’s good to know.
Do you have any other useful apple scripts? Thanks
I don't personally use any other scripts at the moment, however you can find some really cool scripts/work flows on the interwebs. :-)
I tried searching on google but nothing comes up?
It just means the internet. I am surprised you have never come across this term before. Oh well, Interwebs, Internet, The Web, The Net, its all the same thing.
Hello anyone of you has saved the Bryan Smart script
? to announce the battery status looks as the webpage is not longer.
Perhaps a little bit of topic, but I remember some time finding a whole collection of VO friendly scripts for announcing all sort of things, like CPU persentage, RAM status, Wi-Fi connection status etc.
I think this pack also had a very nice battery announcement script included, but I've lost the files myself somewhere along the way, and have never found a valid download of this pack again. Anyone know what I'm talking about?
I have a fully working battery script, which I've also translated to norwegian for my own convenience, but I would be very interested if anyone know where to find the rest of the VO scripts for CPU state and RAM and so on.
Take care :)
I've pasted below the script that I use for announcing the battery level.
You will see that I have it set to use the Ava voice. Simply change this in the last line of the script if you prefer another voice (or remove everything after "%" in the last line to have it use the default voice).
Here comes the script:
set maxCapacity to do shell script "ioreg -w0 -l | grep \"\\\"MaxCapacity\\\" = \""
set maxLevel to the last word of maxCapacity
set curCapacity to do shell script "ioreg -w0 -l | grep \"\\\"CurrentCapacity\\\" = \""
set curLevel to the last word of curCapacity
set battPct to round (100 * curLevel / maxLevel)
set output to "Battery " & battPct & "%"
say "Battery " & battPct & "%" using "Ava"