Date   

Re: For Alberto: can the community declare Columns Review as stable add-on?

Alberto Buffolino
 

Joseph Lee, il 15/09/2021 01.36, ha scritto:
Can we (NVDA add-ons community) declare Columns Review as a stable add-on? This is after version 3.0 stable was merged into add-on files repo unless I’m reading Git log incorrectly.
Alberto:
Hi Joseph,
oh, yes! It's ready.
I modified columnsReview.mdwn on screenReaderTranslations repo forgetting to add the tag stable, I just realized it. I can add it immediately, if you agree.
For mrConfig, instead, I'm not sure how to proceed, remember indications for a pr, but readme tells about issues.
Alberto


Re: How to get working directory?

Robert Hänggi
 

On 15/09/2021, Rui Fontes <rui.fontes@...> wrote:
And, for what I need it have two advantages:

1 - It works in the special folders like Downloads, Documents and so on;

2 - It retrieves the full path with extension even if the extension is
hidden.
Absolutely.
I think the code is also used in the column review add-on for e.g.
searching for files.
There are in any case further interfaces with cool methods for files
and folders available within the shell environment.

I use it simply to do actions on specific files, e.g. previewing audio files.
Cheers
Robert



Many, many thanks!


Rui Fontes


Às 22:40 de 14/09/2021, Robert Hänggi escreveu:
I'm glad that it is working.
Cheers
Robert

On 14/09/2021, Rui Fontes <rui.fontes@...> wrote:
Hello Robert!


Many thanks! With two small corrections, it works beautifully in last
Alpha versions of NVDA and Windows 10 in portuguese...

The corrections are in the:

api.controlTypes.Role.PANE #because of changes in controlTypes

and

focusedItem.path # in Python 3 we do not need the encoding...


fg = api.getForegroundObject()
# We check if we are in the Windows Explorer.
if fg.role != api.controlTypes.Role.PANE and
fg.appModule.appName != "explorer":
return
# self.shell = self.shell or
ct.client.CreateObject("shell.application")
self.shell = COMCreate("shell.application")
# We go through the list of open Windows Explorers to find the
one that has the focus.
for window in self.shell.Windows():
if window.hwnd == fg.windowHandle:
focusedItem=window.Document.FocusedItem
break
else: # loop exhausted
return
# Now that we have the current folder, we can explore the
SelectedItems collection.
targetFile= focusedItem.path


Best regards,

Rui Fontes
NVDA portuguese team


Às 21:56 de 13/09/2021, Robert Hänggi escreveu:
Rui, you will probably have to adapt the code.
I wrote it for 2.7.
Some import statements might also be missing, after all it is only an
excerpt.

from comtypes.client import CreateObject as COMCreate
import api
import os

(global class definition would go here)

def script_sayValue(self, gesture):
fg = api.getForegroundObject()
# We check if we are in the Windows Explorer.
if fg.role != api.controlTypes.ROLE_PANE and fg.appModule.appName !=
"explorer":
return
#self.shell = self.shell or
ct.client.CreateObject("shell.application")
self.shell = COMCreate("shell.application")
# We go through the list of open Windows Explorers to find the one
that has the focus.
for window in self.shell.Windows():
if window.hwnd == fg.windowHandle:
focusedItem=window.Document.FocusedItem
break
else: # loop exhausted
return
# Now that we have the current folder, we can explore the
SelectedItems collection.
targetFile= focusedItem.path.encode('mbcs')
(snip)

Cheers
Robert

On 13/09/2021, Rui Fontes <rui.fontes@...> wrote:
Hello!


@Abdel

Even it was not what the person wants, I myself need that...


@Robert Hänggi, you wrote:Why not using the com interface?
It gives you the selected or focused file in the explorer, if that is
what you want.
There are also some functions for the mentioned special folders, if I
don't err.


I need the full path of the file even in the special folders...

Can you gave me some topics to start?


Rui Fontes


how to use

Às 16:34 de 13/09/2021, Abdel escreveu:
Hi Rui,

Thanks for these explanations, you are right.

We'll wait if it corresponds to what the person is asking for.

Kind regards,
Abdel.

Le 13/09/2021 à 16:01, Rui Fontes a écrit :
Hi Abdel!


If the folder is Downloads, Documents, Images and so on, it will not
work...

The address copied is only Downloads, Documents and so on... Never
c:\users\user\downloads...


To the other folders, it is possible to use:

path = ' '
focusObj = api.getFocusObject()
# If the focus is on windows explorer, gets the
address
of the folder.
if 'explorer' in focusObj.appModule.appModuleName:
hForeground = api.getForegroundObject().windowHandle
h = self.findDescendantWindow(hForeground, 1001)
if not h:
h = self.findDescendantWindow(hForeground, 41477)
h = self.findDescendantWindow(h, "Edit")
if h:
obj =
NVDAObjects.IAccessible.getNVDAObjectFromEvent
(h, -4, 0)
if getwindowsversion().major == 5: # windows xp.
path = obj.value
else:
name = obj.name


Rui Fontes


Às 22:49 de 12/09/2021, Abdel escreveu:
Hi,

I think the person is talking about the current directory in
Windows
Explorer.

You can use "Ald + D" to switch to the address bar.

If that doesn't work, press "F4" or "Control + L".

Then, to copy the address, tab twice and you will find the path
copy
choice in the context menu.

Is this what you are looking for?

Kind regards,
Abdel.

Le 12/09/2021 à 13:03, Lukasz Golonka via groups.io a écrit :
On Sun, 12 Sep 2021 18:52:41 +0800 (CST)
"高生旺" <coscell@...> wrote:

In file explorer I can choose any folder.
Are you asking how to get name of the folder opened in Windows
Explorer?
If so in what opened folder are you interested in? Perhaps if you
would
tell us what you want to achieve in the end we would be able to
assist you
better.

< That folder is the working directory.

Not really. Working directory is per process i.e. os.getcwd
retrieves a
working directory of a calling program. There is no such thing as
a
working directory global to Windows.
















Re: Notice: what will happen to Joseph Lee's add-ons as he is leaving the NVDA community

Noelia Ruiz
 

OK, I had a GithUb Actions which attached metadata to releases as an asset, that isthe .json file. But then a PR in the store changes the metadata schema. For me is easier to work in GitHubActions than in scons, but scons maybe used and then GithUb Actions to upload .nvda-addon and .json, even SHa-256.txt, as release assets. For now I sent a PR, though when the new translation system is in place, this will not be valid, except the workflow created by Mesar to check BOM in Python files, not supported by Gettext.
Just thinking. Cheers

Enviado desde mi iPhone

El 15 sept 2021, a las 6:25, Joseph Lee <joseph.lee22590@...> escribió:



Hi,

I might maintain the template for a little while, perhaps hoping that NV Access and the community can be in charge of collaborating on it (we might as well modify the template/sconstruct to prepare for add-on store JSON generation and other possibilities).

Cheers,

Joseph

 

From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Noelia Ruiz
Sent: Tuesday, September 14, 2021 8:02 PM
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Notice: what will happen to Joseph Lee's add-ons as he is leaving the NVDA community

 

Hi Joseph, despite discrepancies, tanks for your service to the community. Will you maintain the add-on template? Recently I made a PR. Of course, it may be accepted or not, but I didn"t read if you will maintain the template. Cheers

Enviado desde mi iPhone



El 14 sept 2021, a las 15:37, Joseph Lee <joseph.lee22590@...> escribió:



Hello all,

I hinted at this throughout northern summer, but I think it is time to make it official:

My time with the NVDA community has come to a close.

As I’m focusing on graduate school education, I felt it is time to close a chapter in my life. I know that many people are benefiting from code and ad-dons I have produced for the last nine years, and this news may come as a shock to some. In some ways, I have hinted about my eventual departure for some time – originally I planned to retire by June 2021 but decided to stay a while longer to help NV Access with Windows 11 support. Now that NVDA 2021.2 with preliminary Windows 11 support is here, I figured it is now the right moment to end active contributions. I’ll still be around, mostly serving as an advisor.

So what happens with my add-ons? A few things:

  • October 2021: the following add-ons will receive second to last stable releases under my maintenance: Control Usage Assistant, Enhanced Touch Gestures, GoldWave, Resource Monitor, and StationPlaylist. At the same time, the last versions of Event Tracker, Extended Winamp, and Golden Cursor will be in circulation by then. All these releases will require NVDA 2021.2 or later due to control types refactor.
  • November 2021: I hope to release the next version of Clock add-on by then. I will release development builds of this add-on from time to time.
  • January 2022: I will release last versions of most of my add-ons, and from that point on, I hope the community can find new maintainers.
  • Sometime in the future: I will end support for Add-on Updater, and believe it or not, Windows App Essentials, too. Add-on Updater support hinges on the future Add-on Store from NV access, and Windows App Essentials will be end of life once the big ideas from this add-on are included in NVDA (a while ago Chris Toth pointed out on Twitter that it is not right to use an add-on on top of NVDA for basic Windows 10/11 usage scenarios).

IMPORTANT: Clock, Extended Winamp, and Golden Cursor are NOT my add-ons.

Some requests:

  • Apart from Add-on Updater and Windows App Essentials, I’m looking for people who will maintain other add-ons in the future and make them great.
  • For translators: localizations for the following add-ons will be accepted until December 15, 2021 at 23:59 UTC and no more after that: Control Usage assistant, Enhanced Touch Gestures, GoldWave, Resource monitor, and StationPlaylist. This is so that whoever might maintain these add-ons will include newer localizations after that point. Same can be said about Clock add-on – after January 2022, I hope to pass the add-on back to the community for further maintenance.

A note on Add-on Store: until that becomes reality, I will continue to visit and review add-on files repository from time to time.

Thank you. Please stay safe and healthy.

Cheers,

Joseph


Re: Notice: what will happen to Joseph Lee's add-ons as he is leaving the NVDA community

 

Hi,

I might maintain the template for a little while, perhaps hoping that NV Access and the community can be in charge of collaborating on it (we might as well modify the template/sconstruct to prepare for add-on store JSON generation and other possibilities).

Cheers,

Joseph

 

From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Noelia Ruiz
Sent: Tuesday, September 14, 2021 8:02 PM
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Notice: what will happen to Joseph Lee's add-ons as he is leaving the NVDA community

 

Hi Joseph, despite discrepancies, tanks for your service to the community. Will you maintain the add-on template? Recently I made a PR. Of course, it may be accepted or not, but I didn"t read if you will maintain the template. Cheers

Enviado desde mi iPhone



El 14 sept 2021, a las 15:37, Joseph Lee <joseph.lee22590@...> escribió:



Hello all,

I hinted at this throughout northern summer, but I think it is time to make it official:

My time with the NVDA community has come to a close.

As I’m focusing on graduate school education, I felt it is time to close a chapter in my life. I know that many people are benefiting from code and ad-dons I have produced for the last nine years, and this news may come as a shock to some. In some ways, I have hinted about my eventual departure for some time – originally I planned to retire by June 2021 but decided to stay a while longer to help NV Access with Windows 11 support. Now that NVDA 2021.2 with preliminary Windows 11 support is here, I figured it is now the right moment to end active contributions. I’ll still be around, mostly serving as an advisor.

So what happens with my add-ons? A few things:

  • October 2021: the following add-ons will receive second to last stable releases under my maintenance: Control Usage Assistant, Enhanced Touch Gestures, GoldWave, Resource Monitor, and StationPlaylist. At the same time, the last versions of Event Tracker, Extended Winamp, and Golden Cursor will be in circulation by then. All these releases will require NVDA 2021.2 or later due to control types refactor.
  • November 2021: I hope to release the next version of Clock add-on by then. I will release development builds of this add-on from time to time.
  • January 2022: I will release last versions of most of my add-ons, and from that point on, I hope the community can find new maintainers.
  • Sometime in the future: I will end support for Add-on Updater, and believe it or not, Windows App Essentials, too. Add-on Updater support hinges on the future Add-on Store from NV access, and Windows App Essentials will be end of life once the big ideas from this add-on are included in NVDA (a while ago Chris Toth pointed out on Twitter that it is not right to use an add-on on top of NVDA for basic Windows 10/11 usage scenarios).

IMPORTANT: Clock, Extended Winamp, and Golden Cursor are NOT my add-ons.

Some requests:

  • Apart from Add-on Updater and Windows App Essentials, I’m looking for people who will maintain other add-ons in the future and make them great.
  • For translators: localizations for the following add-ons will be accepted until December 15, 2021 at 23:59 UTC and no more after that: Control Usage assistant, Enhanced Touch Gestures, GoldWave, Resource monitor, and StationPlaylist. This is so that whoever might maintain these add-ons will include newer localizations after that point. Same can be said about Clock add-on – after January 2022, I hope to pass the add-on back to the community for further maintenance.

A note on Add-on Store: until that becomes reality, I will continue to visit and review add-on files repository from time to time.

Thank you. Please stay safe and healthy.

Cheers,

Joseph


Re: Notice: what will happen to Joseph Lee's add-ons as he is leaving the NVDA community

Noelia Ruiz
 

Hi Joseph, despite discrepancies, tanks for your service to the community. Will you maintain the add-on template? Recently I made a PR. Of course, it may be accepted or not, but I didn"t read if you will maintain the template. Cheers

Enviado desde mi iPhone

El 14 sept 2021, a las 15:37, Joseph Lee <joseph.lee22590@...> escribió:



Hello all,

I hinted at this throughout northern summer, but I think it is time to make it official:

My time with the NVDA community has come to a close.

As I’m focusing on graduate school education, I felt it is time to close a chapter in my life. I know that many people are benefiting from code and ad-dons I have produced for the last nine years, and this news may come as a shock to some. In some ways, I have hinted about my eventual departure for some time – originally I planned to retire by June 2021 but decided to stay a while longer to help NV Access with Windows 11 support. Now that NVDA 2021.2 with preliminary Windows 11 support is here, I figured it is now the right moment to end active contributions. I’ll still be around, mostly serving as an advisor.

So what happens with my add-ons? A few things:

  • October 2021: the following add-ons will receive second to last stable releases under my maintenance: Control Usage Assistant, Enhanced Touch Gestures, GoldWave, Resource Monitor, and StationPlaylist. At the same time, the last versions of Event Tracker, Extended Winamp, and Golden Cursor will be in circulation by then. All these releases will require NVDA 2021.2 or later due to control types refactor.
  • November 2021: I hope to release the next version of Clock add-on by then. I will release development builds of this add-on from time to time.
  • January 2022: I will release last versions of most of my add-ons, and from that point on, I hope the community can find new maintainers.
  • Sometime in the future: I will end support for Add-on Updater, and believe it or not, Windows App Essentials, too. Add-on Updater support hinges on the future Add-on Store from NV access, and Windows App Essentials will be end of life once the big ideas from this add-on are included in NVDA (a while ago Chris Toth pointed out on Twitter that it is not right to use an add-on on top of NVDA for basic Windows 10/11 usage scenarios).

IMPORTANT: Clock, Extended Winamp, and Golden Cursor are NOT my add-ons.

Some requests:

  • Apart from Add-on Updater and Windows App Essentials, I’m looking for people who will maintain other add-ons in the future and make them great.
  • For translators: localizations for the following add-ons will be accepted until December 15, 2021 at 23:59 UTC and no more after that: Control Usage assistant, Enhanced Touch Gestures, GoldWave, Resource monitor, and StationPlaylist. This is so that whoever might maintain these add-ons will include newer localizations after that point. Same can be said about Clock add-on – after January 2022, I hope to pass the add-on back to the community for further maintenance.

A note on Add-on Store: until that becomes reality, I will continue to visit and review add-on files repository from time to time.

Thank you. Please stay safe and healthy.

Cheers,

Joseph


Re: Inserting additional speech commands based on focus change

Noelia Ruiz
 

Thank you. I hadn"t experiment with speech commands reporting objects before, and your question mades me to learn and enjoy.
Kind regards

Enviado desde mi iPhone

El 14 sept 2021, a las 14:59, Yukio Nozawa <personal@...> escribió:

Hello Noeria,


It works! In order to avoid duplicated speech, it quits event callbacks chain by not calling nextHandler. Might affect other addons, but I still do not need to care about that since it's currently an experimental phase.


Thank you very much!

On 2021/09/12 15:05, Noelia Ruiz wrote:
Hello, you may do something like this (tested inscratchpad:

import globalPluginHandler
import speech
from speech.commands import PitchCommand
import controlTypes

class GlobalPlugin(globalPluginHandler.GlobalPlugin):

def event_gainFocus(self, obj, nextHandler):
speech.speakObject(obj, controlTypes.OutputReason.FOCUS,
_prefixSpeechCommand=PitchCommand(offset=100))

Please see the new speech.commands.py module, speech.speakObject and
speech.speakObjectProperties methods. Also you can see
speech.sayAll.py to see how the CallBack command canbe implemented

2021-09-11 18:11 GMT+02:00, Yukio Nozawa <personal@...>:
Hello.


I want to hook the focus change event, see the new control's role and
insert additional speech command sequence so that I can control how the
focused control is announced. It's like more generalized version of
"Beep before cap" where that specific function is handled manually
inside the speech module.


I haven't involved in NVDA addon development for several years. I still
remember that I can set a callback for focus change event, but not sure
if it's possible to insert speech command values and pass them to the
actual speech.speak(speechSequence) call.


speech.getObjectPropertiesSpeech seems to be generating speech sequence
for focused object, but I don't know if intercepting this function is
appropriate.
https://github.com/nvaccess/nvda/blob/f8f62b04e0d15522f9be3beb9e91cce49b540a16/source/speech/speech.py#L411




Any tips for implementing this? Has anyone tried to do similar tweeks?








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

Yukio Nozawa


Keio University

Faculty of Environment and Information Studies

Jun Murai Laboratory. KUMO Research Group

personal e-mail: personal@...

Website: https://www.nyanchangames.com/

----------






For Alberto: can the community declare Columns Review as stable add-on?

 

Hi Alberto,

Can we (NVDA add-ons community) declare Columns Review as a stable add-on? This is after version 3.0 stable was merged into add-on files repo unless I’m reading Git log incorrectly.

Cheers,

Joseph


Re: How to get working directory?

Rui Fontes
 

And, for what I need it have two advantages:

1 - It works in the special folders like Downloads, Documents and so on;

2 - It retrieves the full path with extension even if the extension is hidden.


Many, many thanks!


Rui Fontes


Às 22:40 de 14/09/2021, Robert Hänggi escreveu:

I'm glad that it is working.
Cheers
Robert

On 14/09/2021, Rui Fontes <rui.fontes@...> wrote:
Hello Robert!


Many thanks! With two small corrections, it works beautifully in last
Alpha versions of NVDA and Windows 10 in portuguese...

The corrections are in the:

api.controlTypes.Role.PANE #because of changes in controlTypes

and

focusedItem.path # in Python 3 we do not need the encoding...


        fg = api.getForegroundObject()
        # We check if we are in the Windows Explorer.
        if fg.role != api.controlTypes.Role.PANE and
fg.appModule.appName != "explorer":
            return
        # self.shell = self.shell or
ct.client.CreateObject("shell.application")
        self.shell = COMCreate("shell.application")
        # We go through the list of open Windows Explorers to find the
one that has the focus.
        for window in self.shell.Windows():
            if window.hwnd == fg.windowHandle:
                focusedItem=window.Document.FocusedItem
                break
        else: # loop exhausted
            return
        # Now that we have the current folder, we can explore the
SelectedItems collection.
        targetFile= focusedItem.path


Best regards,

Rui Fontes
NVDA portuguese team


Às 21:56 de 13/09/2021, Robert Hänggi escreveu:
Rui, you will probably have to adapt the code.
I wrote it for 2.7.
Some import statements might also be missing, after all it is only an
excerpt.

from comtypes.client import CreateObject as COMCreate
import api
import os

(global class definition would go here)

def script_sayValue(self, gesture):
fg = api.getForegroundObject()
# We check if we are in the Windows Explorer.
if fg.role != api.controlTypes.ROLE_PANE and fg.appModule.appName !=
"explorer":
return
#self.shell = self.shell or ct.client.CreateObject("shell.application")
self.shell = COMCreate("shell.application")
# We go through the list of open Windows Explorers to find the one
that has the focus.
for window in self.shell.Windows():
if window.hwnd == fg.windowHandle:
focusedItem=window.Document.FocusedItem
break
else: # loop exhausted
return
# Now that we have the current folder, we can explore the
SelectedItems collection.
targetFile= focusedItem.path.encode('mbcs')
(snip)

Cheers
Robert

On 13/09/2021, Rui Fontes <rui.fontes@...> wrote:
Hello!


@Abdel

Even it was not what the person wants, I myself need that...


@Robert Hänggi, you wrote:Why not using the com interface?
It gives you the selected or focused file in the explorer, if that is
what you want.
There are also some functions for the mentioned special folders, if I
don't err.


I need the full path of the file even in the special folders...

Can you gave me some topics to start?


Rui Fontes


how to use

Às 16:34 de 13/09/2021, Abdel escreveu:
Hi Rui,

Thanks for these explanations, you are right.

We'll wait if it corresponds to what the person is asking for.

Kind regards,
Abdel.

Le 13/09/2021 à 16:01, Rui Fontes a écrit :
Hi Abdel!


If the folder is Downloads, Documents, Images and so on, it will not
work...

The address copied is only Downloads, Documents and so on... Never
c:\users\user\downloads...


To the other folders, it is possible to use:

        path = ' '
        focusObj = api.getFocusObject()
            # If the focus is on windows explorer, gets the address
of the folder.
        if 'explorer' in focusObj.appModule.appModuleName:
            hForeground = api.getForegroundObject().windowHandle
            h = self.findDescendantWindow(hForeground, 1001)
            if not h:
                h = self.findDescendantWindow(hForeground, 41477)
                h = self.findDescendantWindow(h, "Edit")
            if h:
                obj = NVDAObjects.IAccessible.getNVDAObjectFromEvent
(h, -4, 0)
                if getwindowsversion().major == 5: # windows xp.
                    path = obj.value
                else:
                    name = obj.name


Rui Fontes


Às 22:49 de 12/09/2021, Abdel escreveu:
Hi,

I think the person is talking about the current directory in Windows
Explorer.

You can use "Ald + D" to switch to the address bar.

If that doesn't work, press "F4" or "Control + L".

Then, to copy the address, tab twice and you will find the path copy
choice in the context menu.

Is this what you are looking for?

Kind regards,
Abdel.

Le 12/09/2021 à 13:03, Lukasz Golonka via groups.io a écrit :
On Sun, 12 Sep 2021 18:52:41 +0800 (CST)
"高生旺" <coscell@...> wrote:

In file explorer I can choose any folder.
Are you asking how to get name of the folder opened in Windows
Explorer?
If so in what opened folder are you interested in? Perhaps if you
would
tell us what you want to achieve in the end we would be able to
assist you
better.

< That folder is the working directory.

Not really.  Working directory is per process i.e. os.getcwd
retrieves a
working directory of a calling program. There is no such thing as a
working directory global to  Windows.











Re: How to get working directory?

Robert Hänggi
 

I'm glad that it is working.
Cheers
Robert

On 14/09/2021, Rui Fontes <rui.fontes@...> wrote:
Hello Robert!


Many thanks! With two small corrections, it works beautifully in last
Alpha versions of NVDA and Windows 10 in portuguese...

The corrections are in the:

api.controlTypes.Role.PANE #because of changes in controlTypes

and

focusedItem.path # in Python 3 we do not need the encoding...


        fg = api.getForegroundObject()
        # We check if we are in the Windows Explorer.
        if fg.role != api.controlTypes.Role.PANE and
fg.appModule.appName != "explorer":
            return
        # self.shell = self.shell or
ct.client.CreateObject("shell.application")
        self.shell = COMCreate("shell.application")
        # We go through the list of open Windows Explorers to find the
one that has the focus.
        for window in self.shell.Windows():
            if window.hwnd == fg.windowHandle:
                focusedItem=window.Document.FocusedItem
                break
        else: # loop exhausted
            return
        # Now that we have the current folder, we can explore the
SelectedItems collection.
        targetFile= focusedItem.path


Best regards,

Rui Fontes
NVDA portuguese team


Às 21:56 de 13/09/2021, Robert Hänggi escreveu:
Rui, you will probably have to adapt the code.
I wrote it for 2.7.
Some import statements might also be missing, after all it is only an
excerpt.

from comtypes.client import CreateObject as COMCreate
import api
import os

(global class definition would go here)

def script_sayValue(self, gesture):
fg = api.getForegroundObject()
# We check if we are in the Windows Explorer.
if fg.role != api.controlTypes.ROLE_PANE and fg.appModule.appName !=
"explorer":
return
#self.shell = self.shell or ct.client.CreateObject("shell.application")
self.shell = COMCreate("shell.application")
# We go through the list of open Windows Explorers to find the one
that has the focus.
for window in self.shell.Windows():
if window.hwnd == fg.windowHandle:
focusedItem=window.Document.FocusedItem
break
else: # loop exhausted
return
# Now that we have the current folder, we can explore the
SelectedItems collection.
targetFile= focusedItem.path.encode('mbcs')
(snip)

Cheers
Robert

On 13/09/2021, Rui Fontes <rui.fontes@...> wrote:
Hello!


@Abdel

Even it was not what the person wants, I myself need that...


@Robert Hänggi, you wrote:Why not using the com interface?
It gives you the selected or focused file in the explorer, if that is
what you want.
There are also some functions for the mentioned special folders, if I
don't err.


I need the full path of the file even in the special folders...

Can you gave me some topics to start?


Rui Fontes


how to use

Às 16:34 de 13/09/2021, Abdel escreveu:
Hi Rui,

Thanks for these explanations, you are right.

We'll wait if it corresponds to what the person is asking for.

Kind regards,
Abdel.

Le 13/09/2021 à 16:01, Rui Fontes a écrit :
Hi Abdel!


If the folder is Downloads, Documents, Images and so on, it will not
work...

The address copied is only Downloads, Documents and so on... Never
c:\users\user\downloads...


To the other folders, it is possible to use:

        path = ' '
        focusObj = api.getFocusObject()
            # If the focus is on windows explorer, gets the address
of the folder.
        if 'explorer' in focusObj.appModule.appModuleName:
            hForeground = api.getForegroundObject().windowHandle
            h = self.findDescendantWindow(hForeground, 1001)
            if not h:
                h = self.findDescendantWindow(hForeground, 41477)
                h = self.findDescendantWindow(h, "Edit")
            if h:
                obj = NVDAObjects.IAccessible.getNVDAObjectFromEvent
(h, -4, 0)
                if getwindowsversion().major == 5: # windows xp.
                    path = obj.value
                else:
                    name = obj.name


Rui Fontes


Às 22:49 de 12/09/2021, Abdel escreveu:
Hi,

I think the person is talking about the current directory in Windows
Explorer.

You can use "Ald + D" to switch to the address bar.

If that doesn't work, press "F4" or "Control + L".

Then, to copy the address, tab twice and you will find the path copy
choice in the context menu.

Is this what you are looking for?

Kind regards,
Abdel.

Le 12/09/2021 à 13:03, Lukasz Golonka via groups.io a écrit :
On Sun, 12 Sep 2021 18:52:41 +0800 (CST)
"高生旺" <coscell@...> wrote:

In file explorer I can choose any folder.
Are you asking how to get name of the folder opened in Windows
Explorer?
If so in what opened folder are you interested in? Perhaps if you
would
tell us what you want to achieve in the end we would be able to
assist you
better.

< That folder is the working directory.

Not really.  Working directory is per process i.e. os.getcwd
retrieves a
working directory of a calling program. There is no such thing as a
working directory global to  Windows.
















Re: How to get working directory?

Rui Fontes
 

Hello Robert!


Many thanks! With two small corrections, it works beautifully in last Alpha versions of NVDA and Windows 10 in portuguese...

The corrections are in the:

api.controlTypes.Role.PANE #because of changes in controlTypes

and

focusedItem.path # in Python 3 we do not need the encoding...


        fg = api.getForegroundObject()
        # We check if we are in the Windows Explorer.
        if fg.role != api.controlTypes.Role.PANE and fg.appModule.appName != "explorer":
            return
        # self.shell = self.shell or ct.client.CreateObject("shell.application")
        self.shell = COMCreate("shell.application")
        # We go through the list of open Windows Explorers to find the one that has the focus.
        for window in self.shell.Windows():
            if window.hwnd == fg.windowHandle:
                focusedItem=window.Document.FocusedItem
                break
        else: # loop exhausted
            return
        # Now that we have the current folder, we can explore the SelectedItems collection.
        targetFile= focusedItem.path


Best regards,

Rui Fontes
NVDA portuguese team


Às 21:56 de 13/09/2021, Robert Hänggi escreveu:

Rui, you will probably have to adapt the code.
I wrote it for 2.7.
Some import statements might also be missing, after all it is only an excerpt.

from comtypes.client import CreateObject as COMCreate
import api
import os

(global class definition would go here)

def script_sayValue(self, gesture):
fg = api.getForegroundObject()
# We check if we are in the Windows Explorer.
if fg.role != api.controlTypes.ROLE_PANE and fg.appModule.appName !=
"explorer":
return
#self.shell = self.shell or ct.client.CreateObject("shell.application")
self.shell = COMCreate("shell.application")
# We go through the list of open Windows Explorers to find the one
that has the focus.
for window in self.shell.Windows():
if window.hwnd == fg.windowHandle:
focusedItem=window.Document.FocusedItem
break
else: # loop exhausted
return
# Now that we have the current folder, we can explore the
SelectedItems collection.
targetFile= focusedItem.path.encode('mbcs')
(snip)

Cheers
Robert

On 13/09/2021, Rui Fontes <rui.fontes@...> wrote:
Hello!


@Abdel

Even it was not what the person wants, I myself need that...


@Robert Hänggi, you wrote:Why not using the com interface?
It gives you the selected or focused file in the explorer, if that is
what you want.
There are also some functions for the mentioned special folders, if I
don't err.


I need the full path of the file even in the special folders...

Can you gave me some topics to start?


Rui Fontes


how to use

Às 16:34 de 13/09/2021, Abdel escreveu:
Hi Rui,

Thanks for these explanations, you are right.

We'll wait if it corresponds to what the person is asking for.

Kind regards,
Abdel.

Le 13/09/2021 à 16:01, Rui Fontes a écrit :
Hi Abdel!


If the folder is Downloads, Documents, Images and so on, it will not
work...

The address copied is only Downloads, Documents and so on... Never
c:\users\user\downloads...


To the other folders, it is possible to use:

        path = ' '
        focusObj = api.getFocusObject()
            # If the focus is on windows explorer, gets the address
of the folder.
        if 'explorer' in focusObj.appModule.appModuleName:
            hForeground = api.getForegroundObject().windowHandle
            h = self.findDescendantWindow(hForeground, 1001)
            if not h:
                h = self.findDescendantWindow(hForeground, 41477)
                h = self.findDescendantWindow(h, "Edit")
            if h:
                obj = NVDAObjects.IAccessible.getNVDAObjectFromEvent
(h, -4, 0)
                if getwindowsversion().major == 5: # windows xp.
                    path = obj.value
                else:
                    name = obj.name


Rui Fontes


Às 22:49 de 12/09/2021, Abdel escreveu:
Hi,

I think the person is talking about the current directory in Windows
Explorer.

You can use "Ald + D" to switch to the address bar.

If that doesn't work, press "F4" or "Control + L".

Then, to copy the address, tab twice and you will find the path copy
choice in the context menu.

Is this what you are looking for?

Kind regards,
Abdel.

Le 12/09/2021 à 13:03, Lukasz Golonka via groups.io a écrit :
On Sun, 12 Sep 2021 18:52:41 +0800 (CST)
"高生旺" <coscell@...> wrote:

In file explorer I can choose any folder.
Are you asking how to get name of the folder opened in Windows
Explorer?
If so in what opened folder are you interested in? Perhaps if you
would
tell us what you want to achieve in the end we would be able to
assist you
better.

< That folder is the working directory.

Not really.  Working directory is per process i.e. os.getcwd
retrieves a
working directory of a calling program. There is no such thing as a
working directory global to  Windows.











Notice: what will happen to Joseph Lee's add-ons as he is leaving the NVDA community

 

Hello all,

I hinted at this throughout northern summer, but I think it is time to make it official:

My time with the NVDA community has come to a close.

As I’m focusing on graduate school education, I felt it is time to close a chapter in my life. I know that many people are benefiting from code and ad-dons I have produced for the last nine years, and this news may come as a shock to some. In some ways, I have hinted about my eventual departure for some time – originally I planned to retire by June 2021 but decided to stay a while longer to help NV Access with Windows 11 support. Now that NVDA 2021.2 with preliminary Windows 11 support is here, I figured it is now the right moment to end active contributions. I’ll still be around, mostly serving as an advisor.

So what happens with my add-ons? A few things:

  • October 2021: the following add-ons will receive second to last stable releases under my maintenance: Control Usage Assistant, Enhanced Touch Gestures, GoldWave, Resource Monitor, and StationPlaylist. At the same time, the last versions of Event Tracker, Extended Winamp, and Golden Cursor will be in circulation by then. All these releases will require NVDA 2021.2 or later due to control types refactor.
  • November 2021: I hope to release the next version of Clock add-on by then. I will release development builds of this add-on from time to time.
  • January 2022: I will release last versions of most of my add-ons, and from that point on, I hope the community can find new maintainers.
  • Sometime in the future: I will end support for Add-on Updater, and believe it or not, Windows App Essentials, too. Add-on Updater support hinges on the future Add-on Store from NV access, and Windows App Essentials will be end of life once the big ideas from this add-on are included in NVDA (a while ago Chris Toth pointed out on Twitter that it is not right to use an add-on on top of NVDA for basic Windows 10/11 usage scenarios).

IMPORTANT: Clock, Extended Winamp, and Golden Cursor are NOT my add-ons.

Some requests:

  • Apart from Add-on Updater and Windows App Essentials, I’m looking for people who will maintain other add-ons in the future and make them great.
  • For translators: localizations for the following add-ons will be accepted until December 15, 2021 at 23:59 UTC and no more after that: Control Usage assistant, Enhanced Touch Gestures, GoldWave, Resource monitor, and StationPlaylist. This is so that whoever might maintain these add-ons will include newer localizations after that point. Same can be said about Clock add-on – after January 2022, I hope to pass the add-on back to the community for further maintenance.

A note on Add-on Store: until that becomes reality, I will continue to visit and review add-on files repository from time to time.

Thank you. Please stay safe and healthy.

Cheers,

Joseph


Re: Inserting additional speech commands based on focus change

Yukio Nozawa <personal@...>
 

Hello Noeria,


It works! In order to avoid duplicated speech, it quits event callbacks chain by not calling nextHandler. Might affect other addons, but I still do not need to care about that since it's currently an experimental phase.


Thank you very much!

On 2021/09/12 15:05, Noelia Ruiz wrote:
Hello, you may do something like this (tested inscratchpad:

import globalPluginHandler
import speech
from speech.commands import PitchCommand
import controlTypes

class GlobalPlugin(globalPluginHandler.GlobalPlugin):

def event_gainFocus(self, obj, nextHandler):
speech.speakObject(obj, controlTypes.OutputReason.FOCUS,
_prefixSpeechCommand=PitchCommand(offset=100))

Please see the new speech.commands.py module, speech.speakObject and
speech.speakObjectProperties methods. Also you can see
speech.sayAll.py to see how the CallBack command canbe implemented

2021-09-11 18:11 GMT+02:00, Yukio Nozawa <personal@...>:
Hello.


I want to hook the focus change event, see the new control's role and
insert additional speech command sequence so that I can control how the
focused control is announced. It's like more generalized version of
"Beep before cap" where that specific function is handled manually
inside the speech module.


I haven't involved in NVDA addon development for several years. I still
remember that I can set a callback for focus change event, but not sure
if it's possible to insert speech command values and pass them to the
actual speech.speak(speechSequence) call.


speech.getObjectPropertiesSpeech seems to be generating speech sequence
for focused object, but I don't know if intercepting this function is
appropriate.
https://github.com/nvaccess/nvda/blob/f8f62b04e0d15522f9be3beb9e91cce49b540a16/source/speech/speech.py#L411




Any tips for implementing this? Has anyone tried to do similar tweeks?








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

Yukio Nozawa


Keio University

Faculty of Environment and Information Studies

Jun Murai Laboratory. KUMO Research Group

personal e-mail: personal@...

Website: https://www.nyanchangames.com/

----------


Re: NVDA 2021.1 compatibility document updated

 

Hi,

And they have been merged successfully – thanks for all your hard work.

Cheers,

Joseph

 

From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Abdel
Sent: Monday, September 13, 2021 10:22 PM
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] NVDA 2021.1 compatibility document updated

 

Hi Joseph and all,

Thanks Joseph and Reef, I made the PRS for the stable versions of these 3 add-ons just yesterday.

Kind regards,
Abdel.

Le 14/09/2021 à 06:34, Joseph Lee a écrit :

Hi all,

The NVDA 2021.1 compatibility document was updated based on latest add-on releases. In particular, some add-ons previously marked as incompatible are now compatible, including MP3 Direct Cut, Day of the week, and several others.

Cheers,

Joseph


Re: NVDA 2021.1 compatibility document updated

Abdel
 

Hi Joseph and all,

Thanks Joseph and Reef, I made the PRS for the stable versions of these 3 add-ons just yesterday.

Kind regards,
Abdel.

Le 14/09/2021 à 06:34, Joseph Lee a écrit :

Hi all,

The NVDA 2021.1 compatibility document was updated based on latest add-on releases. In particular, some add-ons previously marked as incompatible are now compatible, including MP3 Direct Cut, Day of the week, and several others.

Cheers,

Joseph


NVDA 2021.1 compatibility document updated

 

Hi all,

The NVDA 2021.1 compatibility document was updated based on latest add-on releases. In particular, some add-ons previously marked as incompatible are now compatible, including MP3 Direct Cut, Day of the week, and several others.

Cheers,

Joseph


Re: Clock add-on: version 21.09 released, what's coming in the next version #addonrelease

 

Hi all,

Clock 21.09 is (finally) available via Add-on Updater. Note that you must be running NVDA 2019.3 or later to instlal this add-on. Also, if you are on dev channel for this add-on, you will be prompted to update to 21.09.

Cheers,

Joseph


NVDA 2021.2 is now available

Sean Budd (NV Access)
 

Hi everyone,
 
NV Access is pleased to announce that NVDA 2021.2 is now available for download.
Featuring preliminary Windows 11 support, Updates to the COM Registration fixing tool eSpeak-NG, LibLouis, Braille & more!
Check the changes for developers for early warnings on breaking API changes announced for 2022.1, and backwards compatible changes introduced to the API in this release.
 
Cheers,
Sean


FW: [nvda-devel] NVDA 2021.2 is now available

 

 

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of sean@...
Sent: Monday, September 13, 2021 7:52 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] NVDA 2021.2 is now available

 

Hi everyone,

 

NV Access is pleased to announce that NVDA 2021.2 is now available for download. Featuring preliminary Windows 11 support, Updates to the COM Registration fixing tool eSpeak-NG, LibLouis, Braille & more! We encourage all users to upgrade to this version.

 

Cheers,

Sean


Re: How to get working directory?

Robert Hänggi
 

Rui, you will probably have to adapt the code.
I wrote it for 2.7.
Some import statements might also be missing, after all it is only an excerpt.

from comtypes.client import CreateObject as COMCreate
import api
import os

(global class definition would go here)

def script_sayValue(self, gesture):
fg = api.getForegroundObject()
# We check if we are in the Windows Explorer.
if fg.role != api.controlTypes.ROLE_PANE and fg.appModule.appName !=
"explorer":
return
#self.shell = self.shell or ct.client.CreateObject("shell.application")
self.shell = COMCreate("shell.application")
# We go through the list of open Windows Explorers to find the one
that has the focus.
for window in self.shell.Windows():
if window.hwnd == fg.windowHandle:
focusedItem=window.Document.FocusedItem
break
else: # loop exhausted
return
# Now that we have the current folder, we can explore the
SelectedItems collection.
targetFile= focusedItem.path.encode('mbcs')
(snip)

Cheers
Robert

On 13/09/2021, Rui Fontes <rui.fontes@...> wrote:
Hello!


@Abdel

Even it was not what the person wants, I myself need that...


@Robert Hänggi, you wrote:Why not using the com interface?
It gives you the selected or focused file in the explorer, if that is
what you want.
There are also some functions for the mentioned special folders, if I
don't err.


I need the full path of the file even in the special folders...

Can you gave me some topics to start?


Rui Fontes


how to use

Às 16:34 de 13/09/2021, Abdel escreveu:
Hi Rui,

Thanks for these explanations, you are right.

We'll wait if it corresponds to what the person is asking for.

Kind regards,
Abdel.

Le 13/09/2021 à 16:01, Rui Fontes a écrit :
Hi Abdel!


If the folder is Downloads, Documents, Images and so on, it will not
work...

The address copied is only Downloads, Documents and so on... Never
c:\users\user\downloads...


To the other folders, it is possible to use:

        path = ' '
        focusObj = api.getFocusObject()
            # If the focus is on windows explorer, gets the address
of the folder.
        if 'explorer' in focusObj.appModule.appModuleName:
            hForeground = api.getForegroundObject().windowHandle
            h = self.findDescendantWindow(hForeground, 1001)
            if not h:
                h = self.findDescendantWindow(hForeground, 41477)
                h = self.findDescendantWindow(h, "Edit")
            if h:
                obj = NVDAObjects.IAccessible.getNVDAObjectFromEvent
(h, -4, 0)
                if getwindowsversion().major == 5: # windows xp.
                    path = obj.value
                else:
                    name = obj.name


Rui Fontes


Às 22:49 de 12/09/2021, Abdel escreveu:
Hi,

I think the person is talking about the current directory in Windows
Explorer.

You can use "Ald + D" to switch to the address bar.

If that doesn't work, press "F4" or "Control + L".

Then, to copy the address, tab twice and you will find the path copy
choice in the context menu.

Is this what you are looking for?

Kind regards,
Abdel.

Le 12/09/2021 à 13:03, Lukasz Golonka via groups.io a écrit :
On Sun, 12 Sep 2021 18:52:41 +0800 (CST)
"高生旺" <coscell@...> wrote:

In file explorer I can choose any folder.
Are you asking how to get name of the folder opened in Windows
Explorer?
If so in what opened folder are you interested in? Perhaps if you
would
tell us what you want to achieve in the end we would be able to
assist you
better.

< That folder is the working directory.

Not really.  Working directory is per process i.e. os.getcwd
retrieves a
working directory of a calling program. There is no such thing as a
working directory global to  Windows.














Re: Clock September 13th development build posted

 

Hi,
Version 21.09 (latest stable) is being prepared to go up on Add-on Updater.
Cheers,
Joseph

-----Original Message-----
From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Paulius
Sent: Monday, September 13, 2021 11:14 AM
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Clock September 13th development build posted

Hello,
Quick question: if I have Clock 21.07 stable installed, when can I expect to get the latest version through add-on updater?
Best regards,
Paulius

2021-09-13 21:04 GMT+03:00, Joseph Lee <joseph.lee22590@...>:
Hi,

September 13th dev build revision A is now available:

https://github.com/hkatic/clock/releases/download/v21.09/clock-2021091
3A-dev
.nvda-addon



This revision fixes a case where Clock setup screen won't load if
quiet hours is not defined. If you've downloaded the original dev
build, please install revision A on top of that.

Cheers,

Joseph



From: nvda-addons@nvda-addons.groups.io
<nvda-addons@nvda-addons.groups.io>
On Behalf Of Joseph Lee via groups.io
Sent: Monday, September 13, 2021 10:17 AM
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] Clock September 13th development build posted



Hi all,

To fulfill a suggestion from Abdel and to let others test upcoming
changes, here is Clock add-on September 13th development build:

https://github.com/hkatic/clock/releases/download/v21.09/clock-20210913-dev.
nvda-addon



Note that this is a snapshot candidate - if things go well and I get
around to resolving bug reports, the next official dev build will be
released in a week or so; in the meantime dev builds will be in try
build form - you can install it and give feedback, but when you check
for updates, Add-on Updater will give you what appears to be an older
release (don't worry about it; you can et around by telling Add-on
Updater to prevent updates for this particular add-on).



Changes:



From 21.07:

* This build includes everything from upcoming 21.09 release, mostly
modernization updates.



From 21.09:

* Some messages will be in English as messages are being edited to be
more user friendly.
* If you are using Persian calendar, pressing nVDA+F12 three times
quickly may result in NVDA appearing to do nothing for a short while -
don't worry about this and is beyond NVDA's control.
* Clock and alarm setup screens: messages should be more user
friendly.
* Time formats: a possible resolution to a bug where 24-hour format is
shown as 12-hour format within specific time periods (shortly after
midnight, for example). Please test and make sure this is working as
intended.
* Quiet hours set up: quiet hours start and end times interface has
changed completely. Instead of entering quiet hours into edit fields
(using specific format), combo boxes will be used to define quiet
hours. Also, "input in 24-hour format" checkbox is now a time format
combo box where you can choose between 12-hour and 24-hour format, and
as you do so, hour combo box items will change to reflect the chosen
time format. Note that due to the way the combo boxes work, it may
take up to a second for clock setup settings panel to be ready - in
order to speed things up, we must give up 12-hour format and
standardize on 24-hour format for quiet hours specification (which
also means hours and minutes combo boxes will become edit spin
controls), something that won't happen unless the community says
otherwise by next year. A bonus for developers: with this change, there is no longer a need to validate quiet hours spec before saving settings.
* Various optimizations.



I won't be able to work on Clock add-on until the weekend due to
graduate school classes. Keep comments, suggestions, and bug reports coming.

Cheers,

Joseph








2961 - 2980 of 19875