[jawsscripts] Re: endless chatter

You might consider setting up a global variable, say something like
giSuppressReading, then write a quick function, say
clearSuppression(), that just sets it to 0, then in your
autoStartEvent, set it to 1 and schedule the clearSupression function
to run in, say, 10 tenths of a second, and finally in your
sayNonhighlightedText function, avoid the extra speech if the new
global variable is not 0.  The effect of all this will be to prevent
new text from speaking when you've just switched into the application.
Switching into an application does tend to fire a lot of NewTextEvents
and sayNonhighlightedText calls.

On Mon, Dec 31, 2007 at 10:36:49AM -0800, The dark Count wrote:
Hello all.
I had to modify the say none highlighted text function to speak the text
of a window which 
was not speaking on an application.
The problem now is that though the modification works as required to speak
the needed text, 
I get the entire window read each time I alt tab and switch  to the
application or refresh the 
screan, and I am not too sure which function I should modify to make this
not happen.
My function callss uppon the buffer to speak if it does not equal its
previous string value.
So I will give it to you below.

Void Function SayNonHighlightedText (handle hwnd, string buffer)
var
int mycontrol
let mycontrol=GetControlID (hwnd)
;read nonhighlighted text in other echo modes
If (GetScreenEcho ()> 1) Then
Say (buffer, OT_buffer)
EndIf
;intercept and speak messages in chat window
if (mycontrol == 1204) Then
If (prevstatus != buffer) Then
Say (buffer, OT_buffer)
let prevstatus =buffer
let ms1 = buffer
EndIf
EndIf 
EndFunction

As I mentioned this works fine for what I need, but I have the added
chatter each time I focus 
away from the application.
I don't want to put something in the focus change event that will suddenly
break the say none 
highlighted function.
As of now I am using the default focus changed event, so it is not even in
my scripts.

tia
 D C


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

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________ 
View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: