the script works sort of. My status menu says charged but the script says 
battery 98 percent.
On Dec 23, 2010, at 4:52 PM, Marlaina Lieberg wrote:

> Could somebody talk me through doing this off list?  I hate to clog the list 
> but have never done this and would like to.  
> 
> Marlaina
> 
> 1guide...@gmail.com
> On Dec 23, 2010, at 12:34 PM, Hai Nguyen wrote:
> 
> Good afternoon everyone,
> Rather than going through all of the status menus just to find one small 
> piece of information, in this case, the battery status, I've done the 
> following.
> Please compile the following Apple script and associate it with a keyboard 
> commander shortcut.
> 
> Happy Holidays to all and be safe out there.
> 
> 
> --Author Hai Nguyen Ly November 28, 2010
> (*
> This Apple script will querie for the battery status and speak the output. 
> This script works best when associated with a keyboard shortcut and used in 
> conjunction with VoiceOver.
> *)
> on isVoiceOverRunningWithAppleScript()
>       set isRunning to true
>       
>       -- is AppleScript enabled on VoiceOver --
>       tell application "VoiceOver"
>               try
>                       set x to bounds of vo cursor
>               on error
>                       set isRunning to false
>               end try
>       end tell
>       return isRunning
> end isVoiceOverRunningWithAppleScript
> 
> 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 & "%"
> if isVoiceOverRunningWithAppleScript() then
>       tell application "VoiceOver"
>               output "Battery " & battPct & "%"
>       end tell
> else
>       say "Battery " & battPct & "%"
> end if
> 
> Regards:
> Hai
> On Dec 23, 2010, at 1:31 PM, Mark BurningHawk Baxter wrote:
> 
>> Pressing VO Shift M twice brings yo to the status menu.  read it like the 
>> menu bar below it; arrow over until you hear the battery status, then down 
>> arrow to check out more battery status and power saver options, etc.
>> 
>> 
>> • Mark BurningHawk Baxter
>> • AIM, Skype and Twitter:  BurningHawk1969
>> • MSN:  burninghawk1...@hotmail.com
>> • My home page:
>> • http://MarkBurningHawk.net/
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "MacVisionaries" group.
>> To post to this group, send email to macvisionar...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> macvisionaries+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/macvisionaries?hl=en.
>> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "MacVisionaries" group.
> To post to this group, send email to macvisionar...@googlegroups.com.
> To unsubscribe from this group, send email to 
> macvisionaries+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/macvisionaries?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "MacVisionaries" group.
> To post to this group, send email to macvisionar...@googlegroups.com.
> To unsubscribe from this group, send email to 
> macvisionaries+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/macvisionaries?hl=en.
> 

Sarah Alawami

MSN: marri...@gmail.com

Website: http://music.marrie.org
youtube: http://youtube.com/marrie125
podcast: http://marrie.podbean.com
podcast mobile http://marrie.podbean.com/mobile

-- 
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To post to this group, send email to macvisionar...@googlegroups.com.
To unsubscribe from this group, send email to 
macvisionaries+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/macvisionaries?hl=en.

Reply via email to