[jawsscripts] Re: how-to translate numeric timer into speaking mins and secs?

  • From: "Homme, James" <james.homme@xxxxxxxxxxxx>
  • To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 23 Jul 2010 07:17:08 -0400

Hi Geoff,
I'm not very awake yet, so please forgive anything that might be incorrect in 
this post.

You could use string segment to extract each part of the time string. You could 
use the : as the separator. I know that there's a function that says how many 
segments there are. Oh yes. It's string segment count. So if string segment 
count says that there are three segments, the first one is hours, the second is 
minutes, and the third is seconds. If it says there are two segments, the first 
is minutes and the second is seconds. If minutes is 0, don't say anything. If 
minutes is > 0 then say the number followed by a space, followed by the word 
minute if the segment says 1, or minutes if it is greater than 1. And you 
always speak the word seconds after the final segment unless that one is 1, 
then you speak second.

Hope that helps.

Jim

Jim Homme,
Usability Services,
Phone: 412-544-1810. Skype: jim.homme
Internal recipients,  Read my accessibility blog. Discuss accessibility here. 
Accessibility Wiki: Breaking news and accessibility advice


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Geoff Chapman
Sent: Friday, July 23, 2010 12:03 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] howTo translate numeric timer into speaking mins and 
secs?

Mighty scripters. would any kind soul feel so able/inclined today, to assist me 
ever so greatly, by either perhaps providing some actual code, or pointers,
 with which I might be able to process a colon delimited numeric string, into 
more friendly speaking of seconds, or minutes and seconds respectively?
as in,
x seconds. or x minutes x seconds?

the timer string always has a minimum of 4 digits delimited by a colon, as in
2 digits, then colon, then another 2 digits, even when seconds only, like this:

00:40

means it's been onHold for 40 seconds etc.

It does do hours as well, as I have here on my test system, <grin,> but I 
severely doubt I have to cover that, as noone's gunna hang around onn Hold in a 
business for xx hours, x minutes and x seconds eh.
<smile.>

However, I'd love it also for the output to be intelligent enough not to 
announce 0 minutes x seconds, when there was only 0 in the minutes column?

Would anyone feel like they could assist with this one today? or, if not time, 
point me in dirrection of how I might begin to tackle the problem?


no builtins I guess to already handle this? it must be a common enough 
occurrance/desire I'd have thought?

my sincerest thanks for any tips/guidance.

 Geoff c.



__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts


This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed.  If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it.  If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
 The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.
__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts:

  • » [jawsscripts] Re: how-to translate numeric timer into speaking mins and secs? - Homme, James