Quantcast

Detecting appearing views in App Module

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Detecting appearing views in App Module

Heiko Folkerts-4
Hi all,
I am currently scripting NVDA to work with Powerdesigner from sybase. In general it is a win32 application so screen review mode can be used.

There are some views that can be enabled or disabled. Unfortunately they don't get the focus when they are activated. So I'd like to react on some kind of event when a view is activated and put the focus on the main control of the view.

I tried event_stateChange and event_ForeGround but none of them seems to fire when activating a view.

Is there any way to find out what events have been fired within NVDA in a specific moment or short time to know how to recognize the event? What is typically used when reacting on windows that will show up?

Heiko


Mit freundlichen Grüßen

Dipl. Inf. (FH)
Heiko Folkerts
Systementwicklung und -Design

--
_______________________________________________________

msg DAVID GmbH · Wendenring 1 · 38114 Braunschweig

Tel.: +49 531 24379-14
Fax.: +49 531 24379-79

E-Mail: mailto:[hidden email]
WWW:    https://www.msg-david.de

Eintragung: Amtsgericht Braunschweig, HRB 3167
Geschäftsführer: Frank Ptok, Andreas Lehmann

_______________________________________________________



------------------------------------------------------------------------------
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detecting appearing views in App Module

Leonard de Ruijter-4

Hello Heiko,


Is it possible to navigate to those views using NVDA Object review, in other words, does a view have its own NVDA Object which is created when the view shows up? In that case, you can use the NVDAObject_init event on the particular object.


Kind regards,
Leonard
On 30-11-2016 10:24, Heiko Folkerts wrote:
Hi all,
I am currently scripting NVDA to work with Powerdesigner from sybase. In general it is a win32 application so screen review mode can be used.

There are some views that can be enabled or disabled. Unfortunately they don't get the focus when they are activated. So I'd like to react on some kind of event when a view is activated and put the focus on the main control of the view.

I tried event_stateChange and event_ForeGround but none of them seems to fire when activating a view.

Is there any way to find out what events have been fired within NVDA in a specific moment or short time to know how to recognize the event? What is typically used when reacting on windows that will show up?

Heiko


Mit freundlichen Grüßen

Dipl. Inf. (FH)
Heiko Folkerts
Systementwicklung und -Design

--
_______________________________________________________

msg DAVID GmbH · Wendenring 1 · 38114 Braunschweig

Tel.: +49 531 24379-14
Fax.: +49 531 24379-79

E-Mail: [hidden email]
WWW:    https://www.msg-david.de

Eintragung: Amtsgericht Braunschweig, HRB 3167
Geschäftsführer: Frank Ptok, Andreas Lehmann

_______________________________________________________



------------------------------------------------------------------------------
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel


------------------------------------------------------------------------------

_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detecting appearing views in App Module

derek riemer
In reply to this post by Heiko Folkerts-4

You want event_gainFocus or event_focusEntered depending on the situation.

If you have the windows sdk included in visual studio if you check the correct boxes, there’s a tool called accevent. There’s also a tool called accprobe. These tools can help in finding events that an app fires. You also can simply try responding to event_gainFocus on your appModule class, or if you are using an overlay, respond to gainFocus (As seen in the NVDA developers guide

On 11/30/2016 2:24 AM, Heiko Folkerts wrote:

Hi all,
I am currently scripting NVDA to work with Powerdesigner from sybase. In general it is a win32 application so screen review mode can be used.

There are some views that can be enabled or disabled. Unfortunately they don't get the focus when they are activated. So I'd like to react on some kind of event when a view is activated and put the focus on the main control of the view.

I tried event_stateChange and event_ForeGround but none of them seems to fire when activating a view.

Is there any way to find out what events have been fired within NVDA in a specific moment or short time to know how to recognize the event? What is typically used when reacting on windows that will show up?

Heiko


Mit freundlichen Grüßen

Dipl. Inf. (FH)
Heiko Folkerts
Systementwicklung und -Design

--
_______________________________________________________

msg DAVID GmbH · Wendenring 1 · 38114 Braunschweig

Tel.: +49 531 24379-14
Fax.: +49 531 24379-79

E-Mail: [hidden email]
WWW:    https://www.msg-david.de

Eintragung: Amtsgericht Braunschweig, HRB 3167
Geschäftsführer: Frank Ptok, Andreas Lehmann

_______________________________________________________



------------------------------------------------------------------------------
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel

--

Derek Riemer

  • Department of computer science, third year undergraduate student.
  • Proud user of the NVDA screen reader.
  • Open source enthusiast.
  • Member of Bridge Cu
  • Avid skiier.

Websites:
Honors portfolio
Awesome little hand built weather app!

[hidden email]
Phone: (303) 906-2194


------------------------------------------------------------------------------

_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detecting appearing views in App Module

Heiko Folkerts-4
In reply to this post by Leonard de Ruijter-4
Hi Leonard,
hmmm, currently I enter review mode NVDA+Numpad7 and navigate to one of the treeview items and move the mouse there. Clicking it brings the focus to the tree view. It is a normal SysTreeView32 object - but when the view is activated event_FocusEntered or event_gainFocus are called with some windows quite distant from the tree view I have to focus upon.
The tre view has a control ID of 1 and it seems that that is quite unique so class and control ID should be enough to identify it.

Heiko


Mit freundlichen Grüßen

Dipl. Inf. (FH)
Heiko Folkerts
Systementwicklung und -Design

--
_______________________________________________________

msg DAVID GmbH · Wendenring 1 · 38114 Braunschweig

Tel.: +49 531 24379-14
Fax.: +49 531 24379-79

E-Mail: mailto:[hidden email]
WWW:    https://www.msg-david.de

Eintragung: Amtsgericht Braunschweig, HRB 3167
Geschäftsführer: Frank Ptok, Andreas Lehmann

_______________________________________________________


-----Ursprüngliche Nachricht-----
Von: Leonard de Ruijter [mailto:[hidden email]]
Gesendet: Mittwoch, 30. November 2016 10:36
An: NVDA screen reader development
Betreff: Re: [Nvda-devel] Detecting appearing views in App Module

Hello Heiko,




Is it possible to navigate to those views using NVDA Object review, in other words, does a view have its own NVDA Object which is created when the view shows up? In that case, you can use the NVDAObject_init event on the particular object.



Kind regards,
Leonard

On 30-11-2016 10:24, Heiko Folkerts wrote:


        Hi all,
        I am currently scripting NVDA to work with Powerdesigner from sybase. In general it is a win32 application so screen review mode can be used.
       
        There are some views that can be enabled or disabled. Unfortunately they don't get the focus when they are activated. So I'd like to react on some kind of event when a view is activated and put the focus on the main control of the view.
       
        I tried event_stateChange and event_ForeGround but none of them seems to fire when activating a view.
       
        Is there any way to find out what events have been fired within NVDA in a specific moment or short time to know how to recognize the event? What is typically used when reacting on windows that will show up?
       
        Heiko
       
       
        Mit freundlichen Grüßen
       
        Dipl. Inf. (FH)
        Heiko Folkerts
        Systementwicklung und -Design
       
        --
        _______________________________________________________
       
        msg DAVID GmbH · Wendenring 1 · 38114 Braunschweig
       
        Tel.: +49 531 24379-14
        Fax.: +49 531 24379-79
       
        E-Mail: mailto:[hidden email]
        WWW:    https://www.msg-david.de
       
        Eintragung: Amtsgericht Braunschweig, HRB 3167
        Geschäftsführer: Frank Ptok, Andreas Lehmann
       
        _______________________________________________________
       
       
       
        ------------------------------------------------------------------------------
        _______________________________________________
        Nvda-devel mailing list
        [hidden email]
        https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detecting appearing views in App Module

Heiko Folkerts-4
In reply to this post by Leonard de Ruijter-4
Hi Leonard,
after thinking a while I understood what you meant by using NVDA_init. After some probing arround I can detect appearance of the view through the event because one of its parent windows (some parent relations away) is used for the event. The tree view itself I am interested in isn't initialized through the event when the view appears.

So I came up with this code:
def event_NVDAObject_init(self, obj):
                ...
                # When the object browser gets activated focus it.
                if obj.windowClassName == "S_CliDrawWnd" and obj.windowControlID == 68116:
                        tones.beep(300,100)
                        obj.children[0].children[2].children[4].setFocus()

The beep is ofcourse just for debugging and the way through the children points to the control I want to be focussed.

But when using this NVDA gets caught in a loop - so setting the focus fires the init event again.

So how to use the event right to focus the control I want?

Heiko

Mit freundlichen Grüßen

Dipl. Inf. (FH)
Heiko Folkerts
Systementwicklung und -Design

--
_______________________________________________________

msg DAVID GmbH · Wendenring 1 · 38114 Braunschweig

Tel.: +49 531 24379-14
Fax.: +49 531 24379-79

E-Mail: mailto:[hidden email]
WWW:    https://www.msg-david.de

Eintragung: Amtsgericht Braunschweig, HRB 3167
Geschäftsführer: Frank Ptok, Andreas Lehmann

_______________________________________________________


-----Ursprüngliche Nachricht-----
Von: Leonard de Ruijter [mailto:[hidden email]]
Gesendet: Mittwoch, 30. November 2016 10:36
An: NVDA screen reader development
Betreff: Re: [Nvda-devel] Detecting appearing views in App Module

Hello Heiko,




Is it possible to navigate to those views using NVDA Object review, in other words, does a view have its own NVDA Object which is created when the view shows up? In that case, you can use the NVDAObject_init event on the particular object.



Kind regards,
Leonard

On 30-11-2016 10:24, Heiko Folkerts wrote:


        Hi all,
        I am currently scripting NVDA to work with Powerdesigner from sybase. In general it is a win32 application so screen review mode can be used.
       
        There are some views that can be enabled or disabled. Unfortunately they don't get the focus when they are activated. So I'd like to react on some kind of event when a view is activated and put the focus on the main control of the view.
       
        I tried event_stateChange and event_ForeGround but none of them seems to fire when activating a view.
       
        Is there any way to find out what events have been fired within NVDA in a specific moment or short time to know how to recognize the event? What is typically used when reacting on windows that will show up?
       
        Heiko
       
       
        Mit freundlichen Grüßen
       
        Dipl. Inf. (FH)
        Heiko Folkerts
        Systementwicklung und -Design
       
        --
        _______________________________________________________
       
        msg DAVID GmbH · Wendenring 1 · 38114 Braunschweig
       
        Tel.: +49 531 24379-14
        Fax.: +49 531 24379-79
       
        E-Mail: mailto:[hidden email]
        WWW:    https://www.msg-david.de
       
        Eintragung: Amtsgericht Braunschweig, HRB 3167
        Geschäftsführer: Frank Ptok, Andreas Lehmann
       
        _______________________________________________________
       
       
       
        ------------------------------------------------------------------------------
        _______________________________________________
        Nvda-devel mailing list
        [hidden email]
        https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detecting appearing views in App Module

Heiko Folkerts-4
In reply to this post by Leonard de Ruijter-4
Hi all,
just for completeness: I finally solved the problem by handling event_gainFocus for the far parent and setting the focus if the expected browsing view exissts under it.


Mit freundlichen Grüßen

Dipl. Inf. (FH)
Heiko Folkerts
Systementwicklung und -Design

--
_______________________________________________________

msg DAVID GmbH · Wendenring 1 · 38114 Braunschweig

Tel.: +49 531 24379-14
Fax.: +49 531 24379-79

E-Mail: mailto:[hidden email]
WWW:    https://www.msg-david.de

Eintragung: Amtsgericht Braunschweig, HRB 3167
Geschäftsführer: Frank Ptok, Andreas Lehmann

_______________________________________________________


-----Ursprüngliche Nachricht-----
Von: Leonard de Ruijter [mailto:[hidden email]]
Gesendet: Mittwoch, 30. November 2016 10:36
An: NVDA screen reader development
Betreff: Re: [Nvda-devel] Detecting appearing views in App Module

Hello Heiko,




Is it possible to navigate to those views using NVDA Object review, in other words, does a view have its own NVDA Object which is created when the view shows up? In that case, you can use the NVDAObject_init event on the particular object.



Kind regards,
Leonard

On 30-11-2016 10:24, Heiko Folkerts wrote:


        Hi all,
        I am currently scripting NVDA to work with Powerdesigner from sybase. In general it is a win32 application so screen review mode can be used.
       
        There are some views that can be enabled or disabled. Unfortunately they don't get the focus when they are activated. So I'd like to react on some kind of event when a view is activated and put the focus on the main control of the view.
       
        I tried event_stateChange and event_ForeGround but none of them seems to fire when activating a view.
       
        Is there any way to find out what events have been fired within NVDA in a specific moment or short time to know how to recognize the event? What is typically used when reacting on windows that will show up?
       
        Heiko
       
       
        Mit freundlichen Grüßen
       
        Dipl. Inf. (FH)
        Heiko Folkerts
        Systementwicklung und -Design
       
        --
        _______________________________________________________
       
        msg DAVID GmbH · Wendenring 1 · 38114 Braunschweig
       
        Tel.: +49 531 24379-14
        Fax.: +49 531 24379-79
       
        E-Mail: mailto:[hidden email]
        WWW:    https://www.msg-david.de
       
        Eintragung: Amtsgericht Braunschweig, HRB 3167
        Geschäftsführer: Frank Ptok, Andreas Lehmann
       
        _______________________________________________________
       
       
       
        ------------------------------------------------------------------------------
        _______________________________________________
        Nvda-devel mailing list
        [hidden email]
        https://lists.sourceforge.net/lists/listinfo/nvda-devel



------------------------------------------------------------------------------
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Loading...