Date   

Re: Recommendation to deal with NVDA's configurations in add-ons.

DaVid
 

Hi there!.
Again, I added a small but big change to this utility to help dealing
with the add-ons settings.
Now, all the things can be done with a class decorator. But you can
use the older whay if you want.
see the complete information here:
https://github.com/davidacm/NVDADevelopmentUtilities

Let's see how easy is to write a spec now, and help to the ides to
understand the configuration. All things declared in just one place.


# first, import the utility. The decorator and the register config function.
from ._configHelper import configSpec, registerConfig

# now the class definition, with the decorator first.
# this decorator will replace the attributes with a descriptor to
manage accessing and updating values.
@configSpec
class AppConfig:
# the config path. Important to call it __path__ = ...
__path__ = 'beepKeyboard'
# now the definition of the settings. in form of name = 'desc'
beepUpperWithCapsLock = 'boolean(default=True)'
beepCharacterWithShift = 'boolean(default=False)'
beepToggleKeyChanges = 'boolean(default=False)'
announceToggleStatus = 'boolean(default=True)'
disableBeepingOnPasswordFields = 'boolean(default=True)'
ignoredCharactersForShift = "string(default='\\x1b\\t\\b\\r ')"
beepForCharacters = "string(default='')"
shiftedCharactersTone = 'int_list(default=list(6000,10,25))'
customCharactersTone = 'int_list(default=list(6000,10,25))'
capsLockUpperTone = 'int_list(default=list(3000,40,50))'
toggleOffTone = 'int_list(default=list(500,40,50))'
toggleOnTone = 'int_list(default=list(2000, 40, 50))'
AF = registerConfig(AppConfig)

# accessing an option:
print("this should print False", AF.disableBeepingOnPasswordFields)
# changing the value:
AF.disableBeepingOnPasswordFields = True
# let's see the new value.
print("this should print True", AF.disableBeepingOnPasswordFields)

It can't be easier! I wish to use python typings to make the config
description, and that would help to reduce typing errors. But for now,
is enough for me. Although I think that this idea is perfectly
possible.


Saludos,
David CM.



2022-07-30 5:26 GMT-06:00, DaVid via groups.io <dhf360@...>:


Re: Differences between Winsound and Mwave?

Noelia Ruiz
 

Hello:
Hope other people provide more info.
I tried playing a file with nvwave and it worked well in an add-on. I
think that winsound maybe better to play sounds available on Windows
like icon error, icon question, etc. And for other kind of files, I'd
prefer to use nvwave.
I think that a difference maybe that nvwave takes care about ducking
NVDA if appropriate, and also considers if other sounds have been
played by nvwave.
If you use git grep to find where these modules are used in NVDA,
you'll find that winsound is used in browseMode, and, when sounds are
played to indicate if NVDA is in focus or in browse mode, ducking is
not managed.
Hope this helps

2022-08-02 7:25 GMT+02:00, Han Solo <skydreamer2112@...>:

Hi!


What's the difference?

Which module is better for playing audio in NVDA?

thanks.






Differences between Winsound and Mwave?

Han Solo
 

Hi!


What's the difference?

Which module is better for playing audio in NVDA?

thanks.


Re: a request for an example

Han Solo
 

Thank you!

It's very helpful.


greetings
W dniu 31.07.2022 o 23:13, Stefan Moisei via groups.io pisze:

https://github.com/ilyapashuk/SoundFile-nvda-addon

------ Original Message ------
From: "Han Solo" <skydreamer2112@...>
To: nvda-addons@nvda-addons.groups.io
Sent: 29.07.2022 12:09:13
Subject: [nvda-addons] a request for an example

Hello and welcome!
Could someone write an add-on that would play sound for particular file extensions in Explorer when navigating the files? For example: When the focusis on a file with the .mp3 extension, beep_tone1 is played and the full path to the file is spoken. when beep_tone2 is playing on a .jpg file etc.
I'd like to know better how you can get focus.
Thank you and best regards.








Re: Refresh focus

Noelia Ruiz
 

Also, in case you're interested, you can see this message from Julien
sent to the development list in 2019. I remembered it seeing that you
prefixed a string with u"", and I have found it. In short, this is not
needed though it's not harmful, but for a more readable code you may
want to remove it:

https://groups.io/g/nvda-devel/message/44490

2022-08-01 18:18 GMT+02:00, Ramón García via groups.io
<rgmagadan@...>:

For some reason sending keys it works better. Thanks to Karl-Otto who gave
me a good piece of advice too.

-----Mensaje original-----
De: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> En
nombre de Noelia Ruiz
Enviado el: lunes, 1 de agosto de 2022 14:47
Para: nvda-addons@nvda-addons.groups.io
Asunto: Re: [nvda-addons] Refresh focus

You may try with obj.setfocus method too, to move the focus physically.

Enviado desde mi iPhone

El 1 ago 2022, a las 10:25, Karl-Otto Rosenqvist <Karl-otto@...>
escribió:

Hi!
Just be aware that this won't work on systems that uses other languages
than English. "New" in Swedish is "Ny" so you won't focus that file or
folder if you let the system create it, i e sending Ctrl + Shift + N to
create a new folder. If you set the name yourself it might work if you
don't make the file name translatable because then you have to loop
through the file name to type each letter.

This wasn't meant to be a downer, just a heads up. :)


Good luck!

Karl-Otto

Karl-Otto Rosenqvist
MAWINGU
Orgnr: 750804-3937
0701- 75 98 56
karl-otto@...
https://mawingu.se

Den 2022-07-31 kl. 23:28, skrev Ramón García via groups.io:
This was what I wanted, thank you, Noelia, y shown me the correct way.
def script_newFile(self, gesture):
fgObj = api.getForegroundObject()
route = ""
route += self.getRoute(fgObj)
file = open(route+'\\newFile.txt','a+')
file.close()
KeyboardInputGesture.fromName("f5").send()
KeyboardInputGesture.fromName("n").send()
KeyboardInputGesture.fromName("e").send()
KeyboardInputGesture.fromName("w").send()
KeyboardInputGesture.fromName("f2").send()
-----Mensaje original-----
De: nvda-addons@nvda-addons.groups.io
<nvda-addons@nvda-addons.groups.io> En nombre de Noelia Ruiz Enviado
el: domingo, 31 de julio de 2022 19:39
Para: nvda-addons@nvda-addons.groups.io
Asunto: Re: [nvda-addons] Refresh focus Welcome.
You may show your source code for a better reply. I'd try with the
redraw() method obj.redraw() or sending the f5 key to the system:
from keyboardHandler import KeyboardInputGesture
KeyboardInputGesture.fromName("f5").send()
2022-07-31 15:53 GMT+02:00, Ramón García via groups.io
<rgmagadan@...>:
Hi everyone,

My name is Ramón, from Spain. I am glad to be here.

I would like to ask you something about a script I am writing.

I am in Windows Explorer. There are 5 items in the list view
(obj.parent).

I press the script gesture and a new item is created in that folder.

Now I would like to set the focus to the new item, but when I check
the children of the list view (obj.parent.childCount), the same 5 items
appear.

Is there a way I can force to NVDA to refresh the view list from the
script?

I tried changing the focus from a list item to the list view after
the new file was created but did not work,

I appreciate your answer.

Regards.




















Re: Refresh focus

Ramón García
 

For some reason sending keys it works better. Thanks to Karl-Otto who gave me a good piece of advice too.

-----Mensaje original-----
De: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> En nombre de Noelia Ruiz
Enviado el: lunes, 1 de agosto de 2022 14:47
Para: nvda-addons@nvda-addons.groups.io
Asunto: Re: [nvda-addons] Refresh focus

You may try with obj.setfocus method too, to move the focus physically.

Enviado desde mi iPhone

El 1 ago 2022, a las 10:25, Karl-Otto Rosenqvist <Karl-otto@...> escribió:

Hi!
Just be aware that this won't work on systems that uses other languages than English. "New" in Swedish is "Ny" so you won't focus that file or folder if you let the system create it, i e sending Ctrl + Shift + N to create a new folder. If you set the name yourself it might work if you don't make the file name translatable because then you have to loop through the file name to type each letter.

This wasn't meant to be a downer, just a heads up. :)


Good luck!

Karl-Otto

Karl-Otto Rosenqvist
MAWINGU
Orgnr: 750804-3937
0701- 75 98 56
karl-otto@...
https://mawingu.se

Den 2022-07-31 kl. 23:28, skrev Ramón García via groups.io:
This was what I wanted, thank you, Noelia, y shown me the correct way.
def script_newFile(self, gesture):
fgObj = api.getForegroundObject()
route = ""
route += self.getRoute(fgObj)
file = open(route+'\\newFile.txt','a+')
file.close()
KeyboardInputGesture.fromName("f5").send()
KeyboardInputGesture.fromName("n").send()
KeyboardInputGesture.fromName("e").send()
KeyboardInputGesture.fromName("w").send()
KeyboardInputGesture.fromName("f2").send()
-----Mensaje original-----
De: nvda-addons@nvda-addons.groups.io
<nvda-addons@nvda-addons.groups.io> En nombre de Noelia Ruiz Enviado
el: domingo, 31 de julio de 2022 19:39
Para: nvda-addons@nvda-addons.groups.io
Asunto: Re: [nvda-addons] Refresh focus Welcome.
You may show your source code for a better reply. I'd try with the
redraw() method obj.redraw() or sending the f5 key to the system:
from keyboardHandler import KeyboardInputGesture
KeyboardInputGesture.fromName("f5").send()
2022-07-31 15:53 GMT+02:00, Ramón García via groups.io
<rgmagadan@...>:
Hi everyone,

My name is Ramón, from Spain. I am glad to be here.

I would like to ask you something about a script I am writing.

I am in Windows Explorer. There are 5 items in the list view (obj.parent).

I press the script gesture and a new item is created in that folder.

Now I would like to set the focus to the new item, but when I check
the children of the list view (obj.parent.childCount), the same 5 items appear.

Is there a way I can force to NVDA to refresh the view list from the
script?

I tried changing the focus from a list item to the list view after
the new file was created but did not work,

I appreciate your answer.

Regards.










Re: Refresh focus

Noelia Ruiz
 

You may try with obj.setfocus method too, to move the focus physically.

Enviado desde mi iPhone

El 1 ago 2022, a las 10:25, Karl-Otto Rosenqvist <Karl-otto@...> escribió:

Hi!
Just be aware that this won't work on systems that uses other languages than English. "New" in Swedish is "Ny" so you won't focus that file or folder if you let the system create it, i e sending Ctrl + Shift + N to create a new folder. If you set the name yourself it might work if you don't make the file name translatable because then you have to loop through the file name to type each letter.

This wasn't meant to be a downer, just a heads up. :)


Good luck!

Karl-Otto

Karl-Otto Rosenqvist
MAWINGU
Orgnr: 750804-3937
0701- 75 98 56
karl-otto@...
https://mawingu.se

Den 2022-07-31 kl. 23:28, skrev Ramón García via groups.io:
This was what I wanted, thank you, Noelia, y shown me the correct way.
def script_newFile(self, gesture):
fgObj = api.getForegroundObject()
route = ""
route += self.getRoute(fgObj)
file = open(route+'\\newFile.txt','a+')
file.close()
KeyboardInputGesture.fromName("f5").send()
KeyboardInputGesture.fromName("n").send()
KeyboardInputGesture.fromName("e").send()
KeyboardInputGesture.fromName("w").send()
KeyboardInputGesture.fromName("f2").send()
-----Mensaje original-----
De: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> En nombre de Noelia Ruiz
Enviado el: domingo, 31 de julio de 2022 19:39
Para: nvda-addons@nvda-addons.groups.io
Asunto: Re: [nvda-addons] Refresh focus
Welcome.
You may show your source code for a better reply. I'd try with the
redraw() method obj.redraw() or sending the f5 key to the system:
from keyboardHandler import KeyboardInputGesture
KeyboardInputGesture.fromName("f5").send()
2022-07-31 15:53 GMT+02:00, Ramón García via groups.io
<rgmagadan@...>:
Hi everyone,

My name is Ramón, from Spain. I am glad to be here.

I would like to ask you something about a script I am writing.

I am in Windows Explorer. There are 5 items in the list view (obj.parent).

I press the script gesture and a new item is created in that folder.

Now I would like to set the focus to the new item, but when I check
the children of the list view (obj.parent.childCount), the same 5 items appear.

Is there a way I can force to NVDA to refresh the view list from the
script?

I tried changing the focus from a list item to the list view after the
new file was created but did not work,

I appreciate your answer.

Regards.










Re: Refresh focus

Karl-Otto Rosenqvist
 

Hi!
Just be aware that this won't work on systems that uses other languages than English. "New" in Swedish is "Ny" so you won't focus that file or folder if you let the system create it, i e sending Ctrl + Shift + N to create a new folder. If you set the name yourself it might work if you don't make the file name translatable because then you have to loop through the file name to type each letter.

This wasn't meant to be a downer, just a heads up. :)


Good luck!

Karl-Otto

Karl-Otto Rosenqvist
MAWINGU
Orgnr: 750804-3937
0701- 75 98 56
karl-otto@...
https://mawingu.se

Den 2022-07-31 kl. 23:28, skrev Ramón García via groups.io:

This was what I wanted, thank you, Noelia, y shown me the correct way.
def script_newFile(self, gesture):
fgObj = api.getForegroundObject()
route = ""
route += self.getRoute(fgObj)
file = open(route+'\\newFile.txt','a+')
file.close()
KeyboardInputGesture.fromName("f5").send()
KeyboardInputGesture.fromName("n").send()
KeyboardInputGesture.fromName("e").send()
KeyboardInputGesture.fromName("w").send()
KeyboardInputGesture.fromName("f2").send()
-----Mensaje original-----
De: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> En nombre de Noelia Ruiz
Enviado el: domingo, 31 de julio de 2022 19:39
Para: nvda-addons@nvda-addons.groups.io
Asunto: Re: [nvda-addons] Refresh focus
Welcome.
You may show your source code for a better reply. I'd try with the
redraw() method obj.redraw() or sending the f5 key to the system:
from keyboardHandler import KeyboardInputGesture
KeyboardInputGesture.fromName("f5").send()
2022-07-31 15:53 GMT+02:00, Ramón García via groups.io
<rgmagadan@...>:
Hi everyone,

My name is Ramón, from Spain. I am glad to be here.

I would like to ask you something about a script I am writing.

I am in Windows Explorer. There are 5 items in the list view (obj.parent).

I press the script gesture and a new item is created in that folder.

Now I would like to set the focus to the new item, but when I check
the children of the list view (obj.parent.childCount), the same 5 items appear.

Is there a way I can force to NVDA to refresh the view list from the
script?

I tried changing the focus from a list item to the list view after the
new file was created but did not work,

I appreciate your answer.

Regards.







Re: Refresh focus

Ramón García
 

This was what I wanted, thank you, Noelia, y shown me the correct way.

def script_newFile(self, gesture):
fgObj = api.getForegroundObject()
route = ""
route += self.getRoute(fgObj)
file = open(route+'\\newFile.txt','a+')
file.close()
KeyboardInputGesture.fromName("f5").send()
KeyboardInputGesture.fromName("n").send()
KeyboardInputGesture.fromName("e").send()
KeyboardInputGesture.fromName("w").send()
KeyboardInputGesture.fromName("f2").send()

-----Mensaje original-----
De: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> En nombre de Noelia Ruiz
Enviado el: domingo, 31 de julio de 2022 19:39
Para: nvda-addons@nvda-addons.groups.io
Asunto: Re: [nvda-addons] Refresh focus

Welcome.
You may show your source code for a better reply. I'd try with the
redraw() method obj.redraw() or sending the f5 key to the system:
from keyboardHandler import KeyboardInputGesture
KeyboardInputGesture.fromName("f5").send()



2022-07-31 15:53 GMT+02:00, Ramón García via groups.io
<rgmagadan@...>:

Hi everyone,

My name is Ramón, from Spain. I am glad to be here.

I would like to ask you something about a script I am writing.

I am in Windows Explorer. There are 5 items in the list view (obj.parent).

I press the script gesture and a new item is created in that folder.

Now I would like to set the focus to the new item, but when I check
the children of the list view (obj.parent.childCount), the same 5 items appear.

Is there a way I can force to NVDA to refresh the view list from the
script?

I tried changing the focus from a list item to the list view after the
new file was created but did not work,

I appreciate your answer.

Regards.







Re: a request for an example

Stefan Moisei
 

------ Original Message ------
From: "Han Solo" <skydreamer2112@...>
To: nvda-addons@nvda-addons.groups.io
Sent: 29.07.2022 12:09:13
Subject: [nvda-addons] a request for an example

Hello and welcome!
Could someone write an add-on that would play sound for particular file extensions in Explorer when navigating the files? For example: When the focus is on a file with the .mp3 extension, beep_tone1 is played and the full path to the file is spoken. when beep_tone2 is playing on a .jpg file etc.
I'd like to know better how you can get focus.
Thank you and best regards.





Re: Refresh focus

Ramón García
 

OK. I had to ask again for the focus object after setting the focus.

api.setFocusObject(itemObj)
obj = api.getFocusObject()

-----Mensaje original-----
De: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> En nombre de Ramón García via groups.io
Enviado el: domingo, 31 de julio de 2022 21:01
Para: nvda-addons@nvda-addons.groups.io
Asunto: Re: [nvda-addons] Refresh focus

Thanks for your answer. F5 worked but I can't set the focus to that new file yet.

def script_newFile(self, gesture):
fgObj = api.getForegroundObject()
route = ""
route += self.getRoute(fgObj) # This method return the folder route
file = open(route+'\\newFile.txt','a+')
file.close()
KeyboardInputGesture.fromName("f5").send()
obj = api.getFocusObject()
for itemObj in obj.parent.children:
if itemObj.name == u"newFile.txt":
api.setFocusObject(itemObj)

-----Mensaje original-----
De: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> En nombre de Noelia Ruiz Enviado el: domingo, 31 de julio de 2022 19:39
Para: nvda-addons@nvda-addons.groups.io
Asunto: Re: [nvda-addons] Refresh focus

Welcome.
You may show your source code for a better reply. I'd try with the
redraw() method obj.redraw() or sending the f5 key to the system:
from keyboardHandler import KeyboardInputGesture
KeyboardInputGesture.fromName("f5").send()



2022-07-31 15:53 GMT+02:00, Ramón García via groups.io
<rgmagadan@...>:

Hi everyone,

My name is Ramón, from Spain. I am glad to be here.

I would like to ask you something about a script I am writing.

I am in Windows Explorer. There are 5 items in the list view (obj.parent).

I press the script gesture and a new item is created in that folder.

Now I would like to set the focus to the new item, but when I check
the children of the list view (obj.parent.childCount), the same 5 items appear.

Is there a way I can force to NVDA to refresh the view list from the
script?

I tried changing the focus from a list item to the list view after the
new file was created but did not work,

I appreciate your answer.

Regards.







Re: Refresh focus

Ramón García
 

Thanks for your answer. F5 worked but I can't set the focus to that new file yet.

def script_newFile(self, gesture):
fgObj = api.getForegroundObject()
route = ""
route += self.getRoute(fgObj) # This method return the folder route
file = open(route+'\\newFile.txt','a+')
file.close()
KeyboardInputGesture.fromName("f5").send()
obj = api.getFocusObject()
for itemObj in obj.parent.children:
if itemObj.name == u"newFile.txt":
api.setFocusObject(itemObj)

-----Mensaje original-----
De: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> En nombre de Noelia Ruiz
Enviado el: domingo, 31 de julio de 2022 19:39
Para: nvda-addons@nvda-addons.groups.io
Asunto: Re: [nvda-addons] Refresh focus

Welcome.
You may show your source code for a better reply. I'd try with the
redraw() method obj.redraw() or sending the f5 key to the system:
from keyboardHandler import KeyboardInputGesture
KeyboardInputGesture.fromName("f5").send()



2022-07-31 15:53 GMT+02:00, Ramón García via groups.io
<rgmagadan@...>:

Hi everyone,

My name is Ramón, from Spain. I am glad to be here.

I would like to ask you something about a script I am writing.

I am in Windows Explorer. There are 5 items in the list view (obj.parent).

I press the script gesture and a new item is created in that folder.

Now I would like to set the focus to the new item, but when I check
the children of the list view (obj.parent.childCount), the same 5 items appear.

Is there a way I can force to NVDA to refresh the view list from the
script?

I tried changing the focus from a list item to the list view after the
new file was created but did not work,

I appreciate your answer.

Regards.







Re: Refresh focus

Noelia Ruiz
 

Welcome.
You may show your source code for a better reply. I'd try with the
redraw() method obj.redraw() or sending the f5 key to the system:
from keyboardHandler import KeyboardInputGesture
KeyboardInputGesture.fromName("f5").send()



2022-07-31 15:53 GMT+02:00, Ramón García via groups.io
<rgmagadan@...>:

Hi everyone,

My name is Ramón, from Spain. I am glad to be here.

I would like to ask you something about a script I am writing.

I am in Windows Explorer. There are 5 items in the list view (obj.parent).

I press the script gesture and a new item is created in that folder.

Now I would like to set the focus to the new item, but when I check the
children of the list view (obj.parent.childCount), the same 5 items appear.

Is there a way I can force to NVDA to refresh the view list from the
script?

I tried changing the focus from a list item to the list view after the new
file was created but did not work,

I appreciate your answer.

Regards.







Refresh focus

Ramón García
 

Hi everyone,

My name is Ramón, from Spain. I am glad to be here.

I would like to ask you something about a script I am writing.

I am in Windows Explorer. There are 5 items in the list view (obj.parent).

I press the script gesture and a new item is created in that folder.

Now I would like to set the focus to the new item, but when I check the children of the list view (obj.parent.childCount), the same 5 items appear.

Is there a way I can force to NVDA to refresh the view list from the script?

I tried changing the focus from a list item to the list view after the new file was created but did not work,

I appreciate your answer.

Regards.


Re: Recommendation to deal with NVDA's configurations in add-ons.

DaVid
 

Hi again. I decided to do all the stuff in a configHelper, so, now is
easier to define a conspec. and the options can be recognized by the
ides without issues. I need to do more tests, but I like this way of
declaring configurations specs for add-ons.

Now, to declare a spec you can do the following, if you use this util.

from ._configHelper import *
class AppConfig(BaseConfig):
def __init__(self):
super().__init__('speechHistoryExplorer')

# declaration of the options for the config.
maxHistoryLength = OptConfig('integer(default=500)')
trimWhitespaceFromStart = OptConfig('boolean(default=false)')
trimWhitespaceFromEnd = OptConfig('boolean(default=true)')
beepWhenPerformingActions = OptConfig('boolean(default=true)')
beepPanning = OptConfig('boolean(default=true)')
AF = registerConfig(AppConfig)

And to acces or set a configuration:

AF.beepPanning
AF.beepPanning = True

It can be improved a lot, but is enough for me.

the config helper can be found here:
https://raw.githubusercontent.com/davidacm/SpeechHistoryExplorer/SPE/addon/globalPlugins/speechHistoryExplorer/_configHelper.py


Re: Groups.io will be down for maintenance this evening, starting at 9pm Pacific Time (4AM Saturday July 30, 2022 UTC), for approximately 15 minutes.

Brian's Mail list account
 

They are obviously changing out the hamsters in the wheel again grin.
Brian

--
bglists@...
Sent via blueyonder.(Virgin media)
Please address personal E-mail to:-
briang1@..., putting 'Brian Gaff'
in the display name field.

----- Original Message -----
From: "Joseph Lee" <joseph.lee22590@...>
To: <nvda-addons@nvda-addons.groups.io>
Sent: Friday, July 29, 2022 9:56 PM
Subject: Re: [nvda-addons] Groups.io will be down for maintenance this evening, starting at 9pm Pacific Time (4AM Saturday July 30, 2022 UTC), for approximately 15 minutes.


Hi,

Posted to Beta (Groups.IO) group a few hours ago but Mark didn’t send it out to all users. This is not the same one that affected Groups.IO last night. Official announcement:

main@beta.groups.io | Short downtime this evening <https://beta.groups.io/g/main/topic/short_downtime_this_evening/92691876?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,92691876,previd%3D9223372036854775807,nextid%3D1657942172935505982&previd=9223372036854775807&nextid=1657942172935505982>

Cheers,

Joseph





From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Brian Vogel
Sent: Friday, July 29, 2022 1:51 PM
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] Groups.io will be down for maintenance this evening, starting at 9pm Pacific Time (4AM Saturday July 30, 2022 UTC), for approximately 15 minutes.



I have been led to understand that this information, being presented via a top-of-page banner in the Groups.io web interface, is not sent out to all email participants. So, I'm posting it here so that the readership is aware. I've also been told that email messages sent to any Groups.io address while the service is down for maintenance results in a bounce message back to the sender. You just have to send again later.

--
Brian - Windows 10, 64-Bit, Version 21H2, Build 19044

Any idiot can face a crisis. It's the day-to-day living that wears you out.

~ Anton Chekhov


Recommendation to deal with NVDA's configurations in add-ons.

DaVid
 

Hi there.

Today I developed a small utility to deal with NVDA's settings in our add-ons.
I really hate to write config.conf.['a1']['a2]['option'] each time I
need to access, or set a value in the configuration. But was not a
problem for me until now.
I was merging a pr in one of my add-ons, I was a little asleep, and
was very hard to find the error. Just a capital letter! And the editor
usually don't help with autocompletion if we are writting inside ''.
So, I thought... The config names and path should be declared in one
part only, and access the configurations using that code. Then I
decided to experiment with one of my mantained add-ons.

This consist on a class and a very simple descriptor, to get and
access the config. See this example:

class appConfig:
def __init__(self):
# the path to the config. currently you can't use customized paths
(for example to set it for each synthesizer) but is not hard to
implement it.
self.path = ['speechHistoryExplorer']
# if the following is true, will return the value. False, will
return the configuration name.
# is set to false to help creating the conspec.
self.returnValue = False

# now declaring some configurations, outside the constructor.
# optConfig is the descriptor that does all the ting, but it doesn't
matter to explain it.
# you can use properties too, but is too repetitive.
maxHistoryLength = OptConfig('maxHistoryLength')
trimWhitespaceFromStart = OptConfig('trimWhitespaceFromStart')
trimWhitespaceFromEnd = OptConfig('trimWhitespaceFromEnd')
beepWhenPerformingActions = OptConfig('beepWhenPerformingActions')
beepPanning = OptConfig('beepPanning')

# now instantiate the class.
appConfig = appConfig()

# now, it will create the conspec.
confspec = {
appConfig.maxHistoryLength: 'integer(default=500)',
appConfig.trimWhitespaceFromStart: 'boolean(default=false)',
appConfig.trimWhitespaceFromEnd: 'boolean(default=false)',
appConfig.beepWhenPerformingActions: 'boolean(default=true)',
appConfig.beepPanning: 'boolean(default=true)',
}
# set the conspec to the config of NVDA.
config.conf.spec[appConfig.path[0]] = confspec
# now change returnValue to True, because usually we want the value of
the config, not the name.
appConfig.returnValue = True

# Now, get or set a setting is so easy! just do the following:
# get a copnfig:
appConfig.maxHistoryLength
# set a config:
appConfig.maxHistoryLength = 250

and you can use the smart Autocomplete feature of vs code, for
example. So, you will never make a mistake when refering to a config.
And you can avoid to use those tedious ', [, etc each time you need to
access a configuration.

You can see the entire file here:
https://github.com/davidacm/SpeechHistoryExplorer/blob/SPE/addon/globalPlugins/_config.py

I'm open to suggestions.

Regards,
David.


Re: Groups.io will be down for maintenance this evening, starting at 9pm Pacific Time (4AM Saturday July 30, 2022 UTC), for approximately 15 minutes.

 

Hi,

Posted to Beta (Groups.IO) group a few hours ago but Mark didn’t send it out to all users. This is not the same one that affected Groups.IO last night. Official announcement:

main@beta.groups.io | Short downtime this evening

Cheers,

Joseph

 

 

From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Brian Vogel
Sent: Friday, July 29, 2022 1:51 PM
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] Groups.io will be down for maintenance this evening, starting at 9pm Pacific Time (4AM Saturday July 30, 2022 UTC), for approximately 15 minutes.

 

I have been led to understand that this information, being presented via a top-of-page banner in the Groups.io web interface, is not sent out to all email participants.  So, I'm posting it here so that the readership is aware.  I've also been told that email messages sent to any Groups.io address while the service is down for maintenance results in a bounce message back to the sender.  You just have to send again later.

--
Brian - Windows 10, 64-Bit, Version 21H2, Build 19044

Any idiot can face a crisis. It's the day-to-day living that wears you out.

      ~ Anton Chekhov


Groups.io will be down for maintenance this evening, starting at 9pm Pacific Time (4AM Saturday July 30, 2022 UTC), for approximately 15 minutes.

 

I have been led to understand that this information, being presented via a top-of-page banner in the Groups.io web interface, is not sent out to all email participants.  So, I'm posting it here so that the readership is aware.  I've also been told that email messages sent to any Groups.io address while the service is down for maintenance results in a bounce message back to the sender.  You just have to send again later.
--
Brian - Windows 10, 64-Bit, Version 21H2, Build 19044

Any idiot can face a crisis. It's the day-to-day living that wears you out.

      ~ Anton Chekhov


Re: a request for an example

Rui Fontes
 

That could have some difficulties...

1 - If you have the file extensions hidden, you must first get the file full path in order to get the name and extension of the file.

Doing that for every file in the list while you are arrowing can slower the NVDA performance...


2 - If the extensions are shown, it will be easier, since obtaining the full path will be only performed if the file extension is one we want...


3 - It will be better to get a way to break the process if a keystroke is issued, or only starting the process x miliseconds after a key press...


4 - To start working with getFocus and object properties, I think it will better you start binding different sounds to different objects, like a beep for buttons, two beeps for lists and so on...


Rui Fontes



Às 10:09 de 29/07/2022, Han Solo escreveu:

Hello and welcome!
Could someone write an add-on that would play sound for particular file extensions in Explorer when navigating the files? For example: When the focus is on a file with the .mp3 extension, beep_tone1 is played and the full path to the file is spoken. when beep_tone2 is playing on a .jpg file etc.
I'd like to know better how you can get focus.
Thank you and best regards.



361 - 380 of 19738