[jawsscripts] Re: Braille How can I shorten the text in window titles?

  • From: "David Farough" <David.Farough@xxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 19 May 2010 15:31:52 -0400

Hi Travis:
The trimming code in the function as it happens is not redundant,
because in the first case, the trimming was being applied to the dialog
title.  in the second case it was being done to the various control
names in the dialogue.  Most of these are edit fields.  These controls
also have both English and French text included in their names.  As a
result, both sections of code are necessary to provide the braille
output in this dialog.

In another dialog in this application, the controls are all dot net
edit classes.  The name properties are empty so I will have to go to the
parent in order to move through the windows at that level to find the
appropriate name field.

Here comes my question.
Will I be able to edit the BrlAddObjectName function I provided earlier
to include the processing for these controls, or does Jaws handle the
braille output for these controls in another way?
These controls have the MSAA role of editable text.  They have an
unknown window type so I am not really sure what type of condition I
would need to use to caus jaws to process them correctly.

Do you have any suggestions for me?
Thanks again for all your help.


[jawsscripts] Re: Braille How can I shorten the text in window titles?
From: "Travis Roth" <travis@xxxxxxxxxxxxxx> 
To: <jawsscripts@xxxxxxxxxxxxx> 
Date: Tue, 18 May 2010 12:37:26 -0500 
Hi David,
Glad its working.
In your function, it looks like the string truncation code is
redundant, so you 
could fill the string with the correct information, and then do the
truncation 
with just one block.
That said, since its working now, its sometimes best to leave well
enough 
alone. <smile>


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of David Farough
Sent: Tuesday, May 18, 2010 11:24 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Braille How can I shorten the text in window
titles?

Hi Travis:

Thanks for your response.  I did not notice the not in the menusactive
condition.  That will teach me to use the all punctuation setting I
guess.  It's always good to get a fresh prospective on the logic
though.
 

I should add however that I took that block of code directly from the
braille.jss file.  I assumed that I should leave it in tact in the
brlAddObjectName function.  I do not really understand why it was
there.
 I ultimately had to remove that code because none of my subsequent
processing was happening.

Now the braille output is working as I want it to.  I was able to
remove the brlAddDialogPageName and other brladdObject  functions and
do
all of what I wanted in the BrlAddObjectName function.

My current function is as below.  Thanks for helping me through this.

int function BrailleAddObjectName (int nSubtypeCode)
var
        handle hWnd,
        string strNameText,
        int iFound,
        string sFormTitle

Let hWnd = GetFocus ()
if nSubtypeCode == WT_DIALOG then 
        let sFormTitle = GetWindowName (GetRealWindow (GetFocus ()))
        let iFound = StringContains (sFormTitle, " -")
        if iFound then
                let sFormTitle = StringLeft (sFormTitle, iFound-1)
         endif
        BrailleAddString (sFormTitle,0,0,0)
        return true

elIf nSubtypeCode == WT_EDIT then
        let strNameText = GetWindowName (hWnd)
        let iFound = StringContains (strNameText, " -")
        if iFound then
                let strNameText = StringLeft (strNameText, iFound-1)
        endif
        BrailleAddString (
                strNameText,0,0,0)
        Return TRUE
EndIf
return false

endFunction 


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 
__________�

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

Other related posts: