[jawsscripts] Re: how would peoplehandle this

  • From: "Dennis Brown" <DennisTBrown@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 2 Mar 2009 11:05:30 -0500

Great idea, since it would be specific to that restricted task--tabbing 
through the controls.
With the FocusChangedEvent method, you have several drawbacks--some minor, 
some not:
1. FocusChangedEvent is not the main event fired upon focus changes.  It is 
the FocusChangedEventEx.  This event decides if the ActiveItemChangedEvent 
should fire, such as with list boxes and such, or FocusChangedEvent itself, 
or other particular cases, it may be something different.
2. Adding anything to FocusChangedEvent adds yet another process in every 
instance that event is fired.  You want to cut down on that type of 
redundant processing whenever possible.
3. If something meets those parameters for your code block, it isn't likely 
to get activated automatically.  Restricting it to a TabKey and ShiftTabKey 
script helps keep potential problem from happening unexpectedly--in this 
case, focus being taken away from the current control without warning.

Remember to pass through the scripts if they don't match your condition:

Script TabKey()
If MyConditionIsTrue Then
    Execute My Code
    Return
EndIf
; Call default...
PerformScript TabKey()
EndScript

Hope this helps!



Thanks,
Dennis Brown

----- Original Message ----- 
From: "David Farough" <David.Farough@xxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, March 02, 2009 10:14 AM
Subject: [jawsscripts] Re: how would peoplehandle this


> This would work ok except that you need to determine in which direction
> you are moving.  In FocusChangedEvent you are passed the handle of the
> current window and the handle of the previously focussed window.  So you
> would need to determine based on this information which direction you
> are moving before setting the focus to the appropriate control.
>
> Another way to handle this would be to create versions of the tabKey
> and shiftTabKey  functions  for your application.  This way you do not
> need to be concerned about direction.  Be sure to invoke the default
> versions of these functions when your conditions are not satisfied.
>
> 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
>
>>>> "Sean Randall" <seanr@xxxxxxxxxxxxxxx> 09:49 am Saturday, February
> 28, 2009 >>>
> Sean,
>
> Might you not add something to FocusChangedEvent so that whenever you
> land
> on one of those controls you're moved to the next appropriate one?
>
> Sean.
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx
> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Sean Farrow
> Sent: Saturday, February 28, 2009 9:50 AM
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] how would peoplehandle this
>
> Hi:
> I have a situation where with in the tab order of an application I'm
> scripting, ther are two controls tha gain focus that don' mean
> anything,
> there containers. Ideally what I want to do is skip these two
> controls.
> What is thebest way of doing this?
> Cheers
> Sean.
> __________
> Visit and contribute to The JAWS Script Repository
> http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
> __________
> Visit and contribute to The JAWS Script Repository
> http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
> 

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: