If you get a procedure answer in private please share. thanks

 

From: macvisionaries@googlegroups.com [mailto:macvisionaries@googlegroups.com] 
On Behalf Of Harry Hogue
Sent: Sunday, September 09, 2012 16:02
To: macvisionaries@googlegroups.com
Subject: Re: time short Cut Key [Snowy kitty script and Apples notes]

 

Hi,

 

I just wanted to let everyone know that I was able to successfully use the 
right option + T command to get the current date and time in Mountain Lion, but 
I, too, would like to have it in 24h format.

 

Does anyone know the best way to modify the script so this is possible?  I'm 
not sure how flexible VoiceOver is with scripting language and assigning 
commands (if you can only use the keyboard commander or if you can assign other 
key combinations for Voiceover to run scripts), but I love being able to get 
the time at the press of a button, which is a feature I loved in JAWS and 
missed ever since switching.

 

Thanks,

 

Harry

 

On Sep 8, 2012, at 7:02 AM, Jesus Garcia <jesusga...@gmail.com> wrote:





thanks for the help.

 

From:  <mailto:macvisionaries@googlegroups.com> macvisionaries@googlegroups.com 
[mailto:macvisionaries@ <http://googlegroups.com> googlegroups.com]On Behalf Of 
Red.Falcon
Sent: Saturday, September 08, 2012 08:12
To:  <mailto:macvisionaries@googlegroups.com> macvisionaries@googlegroups.com
Subject: Re: time short Cut Key [Snowy kitty script and Apples notes]

 

Hi again!

Well under Snowy Kitty and thanks to Esther's directions I've found the Apple 
Script that is the one that VO use's with Right option key and T So I will post 
just below what Apple says about using the script and the Script itself [but I 
do not know if it is different under Lion or Mountain Lion]

 

(* 

 Speaks the  date and time of day

 

 Copyright 2008 Apple Inc. All rights reserved.

 

 You may incorporate this Apple sample code into your program(s) without

 restriction.  This Apple sample code has been provided "AS IS" and the

 responsibility for its operation is yours.  You are not permitted to

 redistribute this Apple sample code as "Apple sample code" after having

 made changes.  If you're going to redistribute the code, we require

 that you make it clear that the code was descended from Apple sample

 code, but that you've made changes.

 *)

 

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 currentDate to current date

set amPM to "AM"

set currentHour to (currentDate's hours)

set currentMinutes to currentDate's minutes

 

if (currentHour ≥ 12 and currentHour < 24) then

       set amPM to "PM"

else

       set amPM to "AM"

end if

 

--  make minutes below 10 sound nice

if currentMinutes < 10 then

       set currentMinutes to ("0" & currentMinutes) as text

end if

 

--  ensure 0:nn gets set to 12:nn AM

if currentHour is equal to 0 then

       set currentHour to 12

end if

 

--  readjust for 12 hour time

if (currentHour > 12) then

       set currentHour to (currentHour - 12)

end if

 

set currentTime to ((currentDate's month) as text) & " " & ((currentDate's day) 
as text) & ", " & (currentHour as text) & ":" & ((currentMinutes) as text) & " 
" & amPM as text

 

if isVoiceOverRunningWithAppleScript() then

       tell application "VoiceOver"

               output currentTime

       end tell

else

       say currentTime

end if

 

Cheers

Colin

 

On 8 Sep 2012, at 01:52, Jesus Garcia wrote:






Evening list members does anyone know if there is a way to get the time
announcement key right command T to announce the time as set on the clock? I
have my clock set to 24 hour time, but get standard A.M. P.M. time when I
press the time short cut keys.
thanks

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