[jawsscripts] Re: Simple question regarding sayString, in thevoice you want?

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Wed, 4 Feb 2009 06:56:56 -0500

"Int" and "string" are common to other languages as well.

I agree on capitalization of constants, and I do initial caps on
constants, lower-case initial letters on variables, and allow
mixed-case for the rest of both in my code.

"S" versus "str" is probably part traditions and part individual
preference.  At least they're both clear.

On Wed, Feb 04, 2009 at 10:48:13PM +1100, Geoff Chapman wrote:
p.s. behoove!  now there's a word I haven't heard in a while.
<grin.>


I can certainly see the advantages in the standards around how to do s for
string and gi for Global integer variables etc, and I can even see the
wisdom for indenting.  But, capitalizing all of constant names, such that
jaws no longer reads them nicely or easily, I guess is not something I'm yet
incredibly convinced is optimal!  meaning, I wonder why fs decided that
should be the standard given that negative caveat anyway!

Speaking of standards, can anyone tell me then why we see things like
STRKeyName, presumably the STR meaning string, when other times we see
variables with just an S for string before the variable?
and also why, some declarations are done with the whole word String, yet
others are declared simply with STR, as indeed integer variables are
declared with Int?
is there an answer to that one too which I'd find if I go look up this
standards booklet in the fsdn.chm file?
Guess I should go look huh?.
is it simply to support legacy code done earlier than the standards were put
in place or something like that maybe?

Thanks Jackie and David for all the tips.

From: "Jackie McBride" <abletec@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Saturday, January 31, 2009 1:11 PM
Subject: [jawsscripts] Re: Simple question regarding sayString, in thevoice
you want?


> Geoff:
> There are some standards that FS likes folks to adhere to when writing
> scripts. This again is in the topic of standards in the fsdn 2007 .chm
> file. It's to make it easier for folks to read other peoples' code in
> order to see what's going on. So, if I code somethin, then 6 months or
> a year from now I or some1 else tasked w/doing so can look at the code
> & easily see what was done. Capitalizing constants, starting integer
> variables with the letter i, strings w/s, etc., are part of these
> standards. U may only be writing these for your company. But someday
> you'll retire & some1's gonna have to come after u & maintain your
> code. Or u yourself may have to come back & tweek it after a year or
> 2--it's amazing how easy it is to forget what you've done after a few
> nights of sleep even though you're not as old as me. U can make that
> process either a lot easier or a lot harder by commenting the code
> liberally & following standards--or not. Although the code is for your
> company, it's now professional, in that it's not just for your
> individual use. Learning those standards & applying them would behoove
> u greatly.
>
> HTH.
>
> On 1/30/09, Geoff Chapman <gch@xxxxxxxxxxxxxxxx> wrote:
> > woooo! Jackie and David! thank you thank you!
> > I'm sooo sorry! how could I have not seen this before!  so obvious now
eh.
> > <grin.>
> >
> > Thanks for pointing out to the dumbster this function. I never knew this
> > existed! ok, so maybe I need tips on using the fsdn.chm properly.
> >
> > like I've now typed "say" into the search box of that help file, and
looked
> > down the list of all the SayOptions! my goodness there's a heapofem  in
> > there eh.
> > Some I'd certanily never new existed! so this will be enormously helpful
for
> > me across the board I'd say.
> >
> > Thanks again to both of you for pointing out this one.
> > one other note: it appears to me as though these constants, in the
hjConst
> > file, are all upper case.  Yet it seems to work quite happily, I've just
> > tested it, if their split up using normative Upper and Lower Case
letters to
> > make stuff speak good. like vctx_PcCursor and VCTX_JawsCursor, rather
than
> > VTX_PCCURSOR, which doesn't speak so good. So, is there some magical
> > methodological reason why they've put them all in upper case in this
file?
> > and do we need bother with whatever reason that might be, if they work
> > equally well with mixed case?
> >
> > thanks again for the great tip on this one.
> > that'll be heaps helpful for me now that I know that.
> > geoff c.
> >
> > ----- Original Message -----
> > From: "David Farough" <David.Farough@xxxxxxxxxxxxx>
> > To: <jawsscripts@xxxxxxxxxxxxx>
> > Sent: Saturday, January 31, 2009 3:20 AM
> > Subject: [jawsscripts] Re: Simple question regarding sayString, in
thevoice
> > you want?
> >
> >
> >> Hi Jeff:
> >> How about SayUsingVoice?
> >>
> >> Here is the fsdn entry.
> >>
> >> Function: SayUsingVoice
> >> Description
> >> Speak a string of text using a specific synthisizer voice.
> >>
> >> Returns
> >> Type: Void
> >>
> >>
> >> Parameters
> >> Param 1:
> >> Type: String
> >> Description: Type in the constant representing the voice to be used.
> >> These constants are defined in the file hjconst.jsh and are listed
> >> below: VCTX_GLOBAL, VCTX_MESSAGE, VCTX_KEYBOARD, VCTX_SCREEN,
> >> VCTX_PCCURSOR, VCTX_JAWSCURSOR
> >> Include: Required
> >>
> >>
> >> Param 2:
> >> Type: String
> >> Description: Type the text that is to be spoken, or specify a variable
> >> name or script function that can provide the required text string. Text
> >> strings that are typed must be enclosed within quotation marks.
> >> Include: Required
> >>
> >>
> >> Param 3:
> >> Type: Int
> >> Description: Type in one of the following constants that represent the
> >> output mode to be used: OT_STRING, OT_LINE, OT_WORD, OT_CHAR, OT_FIELD,
> >> OT_CHUNK, OT_SAYALL, OT_SPELL, OT_PHONEMIC, OT_APP_NAME,
OT_DIALOG_NAME,
> >> OT_CONTROL_NAME, OT_MDI_NAME, OT_WINDOW_NAME, OT_GRAPHIC, OT_HELP,
> >> OT_STATUS, OT_SELECTED, OT_TEXT, OT_POSITION, OT_STATIC, OT_FONT,
> >> OT_KEYBOARD, OT_CURSOR, OT_DEBUG.
> >> Include: Required
> >>
> >>
> >> Param 4:
> >> Type: Int
> >> Description: Not available yet
> >> Include: Optional
> >>
> >>
> >> Version
> >> This function is available in the following releases:
> >>
> >> PAC Mate 1.10 and later
> >> JAWS 4.51 and later
> >> Magic 10.5 and later
> >>
> >> David Farough
> >> Application Accessibility Coordinator/coordonateur de l'accessibilit?
> >> Information Technology Services Directorate /
> >> Direction des services d'information technologiques
> >> Public Service Commission / Commission de la fonction publique
> >> Email / Courriel:  David.Farough@xxxxxxxxxxxxx
> >> Tel. / T?l:    (613) 992-2779
> >> __________
> >> Visit and contribute to The JAWS Script Repository
http://jawsscripts.com
> >>
> >> View the list's information and change your settings at
> >> //www.freelists.org/list/jawsscripts
> >>
> >
> > __________
> > Visit and contribute to The JAWS Script Repository
http://jawsscripts.com
> >
> > View the list's information and change your settings at
> > //www.freelists.org/list/jawsscripts
> >
> >
>
>
> -- 
> Change the world--1 deed at a time
> Jackie McBride
> Check out my homepage at:
> www.abletec.serverheaven.net
> & please join my fight against breast cancer
> <http://teamacs.acsevents.org/site/TR?px=1790196&pg=personal&fr_id=3489>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>

__________?
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: