[jawsscripts] Re: Miranda IM reading chat and announcing contact status changes

  • From: "dave grossoehme" <davegross1@xxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sat, 26 Nov 2011 10:17:22 -0600

It sounds like you have a buffer holding the code.  When this buffer fills 
up then you have to restore the buffer.  That would be a guess without more 
information on this program.
Your Friend Dave


--------------------------------------------------
From: "Tony Hernandez" <tonyhspeaks@xxxxxxxxx>
Sent: Saturday, November 26, 2011 9:17 AM
To: <jawsscripts@xxxxxxxxxxxxx>
Subject: [jawsscripts] Miranda IM reading chat and announcing contact status 
changes

> Hi all.
>
>
> Problem 1:  The status changes.
>
>
>
> Miranda has a number of plugins that display status changes in different
> ways. However, I have yet to find a single one that creates a true window
> that has a true type, true name, true etc.  I've tried numerous plugins 
> that
> pop up different windows and then tried to get JAWS to read the text in
> those windows in different ways too numerous to name in full.
> GetTextInWindow, GetWindowText, GetWindowName, just to name a few.  Jaws
> either doesn't see the text because it is transparent or something or
> doesn't even acknowledge that there is text there even when acknowledging
> that a window has been created and even being able to get the owning app
> name, which is usually the DLL that makes up the plugin.  Now ideally 
> there
> would be a status notify plugin that actually makes a true help balloon,
> which jaws actually reads automatically, instead of someone making a 
> plugin
> that looks and acts like a help balloon but really isn't one and then 
> saying
> it's a balloon.  Such a plugin would instantly solve the problem.  My
> current solution works perfectly if and only if Miranda is the focused
> application.
>
>
>
> I'm using the Toltip notify plugin to notify me of status changes.  I have
> the following code in an int function called CheckForMirandaTooltip, which
> takes a single parameter that represents the handle of the window that 
> pops
> up.  I call it h.
>
>
>
> Int Function CheckforMirandaTooltip (handle h)
>
> var
>
> string s
>
> If GetScreenEcho () > Echo_None then
>
> if GetOwningAppName (h) == wo_notify then
>
> ;this is the Tooltip Notify Plugin DLL .
>
> let s = GetWindowText (h, false)
>
> if s then
>
> SayUsingVoice (VCTX_Message, s, OT_User_Requested_Information)
>
> return true
>
> EndIf
>
> EndIf
>
> EndIf
>
> return false
>
> EndFunction
>
>
>
> This code works perfectly if the Miranda window is the one with focus,
> either the main window or an IM window.  I put the following statement in
> the default script file:
>
>
>
> Use "MirandaHelper.jsb"
>
> Then I called the above function in the WindowCreatedEvent in the default
> scripts.  I have been able to confirm that a window is indeed created when
> someone changes their status in my Miranda contacts.  As I said, the 
> script
> works flawlessly if and only if the Miranda application has the focus,
> either in the form of an IM window or in the main window, but it doesn't
> work at all when Miranda is not the focused application.  It appears that 
> no
> text appears to JAWS.  My sighted son tells me that a window pops up with
> text, but even setting jaws to read all text doesn't read that text.  I've
> gotten JAWS to tell me the type of that window that pops up, but it isn't 
> a
> tooltip.  The window type is 0.  Very frustrating.  The author of the 
> plugin
> says it's a tooltip and probably even thinks it's a tooltip, but JAWS
> disagrees.  If I knew how to write a Miranda plugin, I would write one 
> that
> would pop up an actual help balloon and then distribute that, but I don't.
> It seems that no one who has written Miranda plugins understands the
> importance of using standard window types or they don't have the ability 
> to
> use them.  I can't even read the source code of the plugin; the language 
> is
> too unfamiliar to me.
>
>
>
> I've tried adding a string parameter to this function and then calling it 
> in
> the SayNonHighlightedText function instead of WindowCreatedEvent, but no
> joy.  It works flawlessly if and only if Miranda is the application with
> focus.
>
>
>
> Problem 2: The chat reading
>
> I have a script that reads the incoming messages very well using the Homer
> Editor interface.  After a while that script doesn't read the latest
> messages anymore.  It seems to get to appoint where it appears to have
> reached a limit and then just reads the same bit of text over and over and
> won't read past that.  The only way to get it reading properly again is to
> close out of the message window and start a new one.  The code for
> processing the incoming chat messages follows:
>
>
>
> Void Function ProcessNewMessages ()
>
> if giReadChat == on
>
> && GetScreenEcho () > Echo_None then
>
> Say (GetMessageThread (-1), OT_User_Requested_Information)
>
> endIf
>
> EndFunction
>
>
>
> Now the GetMessageThread code
>
>
>
> String Function GetMessageThread (int segIndex)
>
> var
>
> string thread
>
> let thread = StringSegment (GetChatWindowText (), "\r", SegIndex)
>
> return thread
>
> EndFunction
>
>
>
> Now the GetChatWindowText code
>
>
>
> String Function GetChatWindowText ()
>
> return EditGetText (GetChatHistoryWindowHandle ())
>
> EndFunction
>
>
>
> As you can see this is a bit of a treasure hunt.  The ProcessNewMessages
> function uses the last string segment of the newly changed text of the 
> chat
> history window as the newest message, and the segments are delimited by a
> carriage return.  I'm puzzled as to why this gets stuck on a certain bit 
> of
> text after a while.  It doesn't seem to be consistent.  I can't find a way
> to predict that.  The only thing I can think of is that the EditGetText
> function calls some native windows object methods that are limited in how
> much output they can give in one instance of a window.  Does anyone have 
> any
> suggestion as to how to improve this issue?
>
>
>
> Tony Hernandez
>
> http://DutyOfMan.net/
>
> Para oir y bajar la Biblia Sagradas Escrituras Versión Antigua en MP3,
> visite http://dutyofman.net/biblia-audio/
>
>
>
>
> __________�
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
> 
__________�

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

Other related posts: