[jawsscripts] chat client

  • From: "The dark Count" <darkcount1@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Wed, 13 Aug 2008 19:33:04 -0700

Hi all. I sent a message earlier and got no response. So in the hopes that 
perhaps 
vacationing scripters may be back and can offer some thoughts, I would 
appreciate it.
I have gotten a bit rusty with scripting, so thereby the message below.
tia

Hello all.
I have been working with a little chat client which does not read messages
as they come in.

I have been able to make the messages speak by modifying the say non
highlighted text event. Now I am running into the problem of messages at
times being repeated so that the last message repeats before the newest
reads.

The second problem is that when I alt tab away from the application and
switch back to it the function triggers and the whole message window
starts being read.

Here is the function in hopes somebody has suggestions as to how to solve
these problems.

tia

D C
;globals
string prevstatus,
string ms1

Void Function SayNonHighlightedText (handle hwnd, string buffer)
var
int mycontrol
let mycontrol=GetControlID (hwnd)
If ClearSuppression () == 1 Then
return
EndIf
;read nonhighlighted text in other echo modes
If (GetScreenEcho ()> 1) Then
Say (buffer, OT_buffer)
EndIf
;intercept and speak messages in chat window
;window where text is
if (mycontrol == 1204) Then
;code to capture and compare messages as they come in
If (prevstatus != buffer) Then
Say (buffer, OT_buffer)
let prevstatus =buffer
;saving text of last message to be used in another script
let ms1 = buffer
EndIf
EndIf
EndFunction

Code ends.


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

Other related posts: