The GW-Scripting list is a discussion list for information regarding the development and use of Window-Eyes scripts. Any subscriber of the GW-Scripting list has the ability to post on-topic messages.

From:

 Chip Orange

Subject:

 RE: Some help with an app, please

Date:

 Fri, Jul 1, 2011 9:36:30 pm
Hi Steve,

even though I can see this is the more appropriate way to do this, I still
cannot get any of the entries in my test.chr file to load this way, and the
file name of the global character dictionary never changes from the default
one.

Chip


-----Original Message-----
From: Stephen Clower [mailto:steve@gwmicro.com]
Sent: Tuesday, June 28, 2011 1:59 PM
To: gw-scripting@gwmicro.com
Subject: Re: Some help with an app, please

Christo,

What if you change the line
bOpened = ActiveSettings.CharacterDictionary.Open("Afrikaans.chr")
to
bOpened ActiveWindow.Settings2.Global.CharacterDictionary.Open("default.chr")

Does this work for your app?

Regards,
Steve


On 6/28/2011 1:47 PM, Christo de Klerk wrote:
Hello app writers

Chip has been bending over backwards to try and help me, but it looks
like reached a point where help is required from GW Micro developers.
Here is what I am trying to achieve and how I have gone about it and
an alternative that I would like to try if this won't work:

I want to write an app that will monitor to see when the eSpeak
Afrikaans synthesiser becomes active. When it does become active, it
must pronounce the Afrikaans names of punctuation whenever punctuation
is pronounced. Currently Window-Eyes translates the punctuation marks
into words, in other words the "!" character gets replaced by the word
"bang", etc. Now, when I use the synthesiser of another language, like
Afrikaans, those same words are spoken, but with the pronunciation
rules of that language which does not make sense.

My app can now do one of two things. It could either activate a custom
character dictionary containing the Afrikaans names for all the
punctuation marks, or it could bypass Window-Eyes's translation and
send the raw punctuation characters through to eSpeak which will then
pronounce them correctly in Afrikaans. I have tried the first approach.
I have created a character dictionary called Afrikaans.chr and
generated the framework of my app using the WE Framework app and added
the code below. My app successfully detects when the eSpeak Afrikaans
synthesiser becomes active and seems to successfully activate my
character dictionary, Afrikaans.chr, but it doesn't seem to use the
dictionary, because those Afrikaans character names aren't spoken.
Chip doesn't see anything wrong in my code, but perhaps we are missing
something. Here is the code:

ConnectEvent Synthesizers, "OnActivate", "SynthEventHandler"

Function SynthEventHandler(objSynth)
SynthEventHandler = false
If objSynth.ActiveEngine = "eSpeak-AF(SAPI 5)" Then queue
"ActivateAfrikaans"
SynthEventHandler = true
End If
End Function

Sub ActivateAfrikaans
Dim bOpened
bOpened = ActiveSettings.CharacterDictionary.Open("Afrikaans.chr")
If bOpened = true Then
MsgBox "Afrikaans is nou aktief"
Else
MsgBox "Sorry, didn't work"
End If
End Sub

If this approach won't work, is there a way that I can get my app to
send the raw punctuation to the synthesiser? I don't know where my app
should hook in to prevent Window-Eyes translating the punctuation
characters.

To sum up: I want my app to make Window-Eyes do with punctuation what
it already can do with numbers, send them directly to the synthesiser.

I really hope some of you gurus can help.

Kind regards

Christo


--
Stephen Clower
Product support specialist
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com