Good afternoon AS and others, 
Please make sure that you copy the entire script before compiling. If you 
receive an error during compilation, this would be due to an incomplete script.
For those of you who do not feel comfortable with compiling scripts, please 
download the following file and extract it:
http://dl.dropbox.com/u/4918985/BatteryStatus.zip
After the file has been extracted, you will need to associate the script with a 
shortcut key in the VoiceOver Utility under the keyboard commander tab.
Enjoy

Regards:
Hai
On Dec 24, 2010, at 10:28 AM, AZ wrote:

> Hi!
> The script to get battery status yesterday has an error and can not be 
> compiled. The program reports an unexpected ending of a line.
> 
>        AZ
> 24.12.2010 17:14, Larry Skutchan writes:
>> Voiceover already has a command to announce the time. If you have enabled 
>> the Keyboard Commander, which is highly recommended on Macs without number 
>> pads, just hold down the right option key and press T. You can actually 
>> configure the key to use in the Voiceover Utilities program in the 
>> Commanders section.
>> 
>> 
>> On Dec 23, 2010, at 9:15 PM, Scott Ford wrote:
>> 
>>> I would like to learn the step by step proceedure as well.  Please post it, 
>>> because it would be a great recource to have in the archives.
>>> Sincerely,
>>> Scott
>>> On Dec 23, 2010, at 7: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
>>>> 
>>>> [email protected]
>>>> 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:  [email protected]
>>>>> • 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 [email protected].
>>>>> To unsubscribe from this group, send email to 
>>>>> [email protected].
>>>>> 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 [email protected].
>>>> To unsubscribe from this group, send email to 
>>>> [email protected].
>>>> 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 [email protected].
>>>> To unsubscribe from this group, send email to 
>>>> [email protected].
>>>> 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 [email protected].
>>> To unsubscribe from this group, send email to 
>>> [email protected].
>>> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/macvisionaries?hl=en.

Reply via email to