Re: wx.FileDialog and scripts

Javi Domínguez

Hello, Abdel.

Thanks. My code is very similar to this and in the console it works fine. The problem is that if I put that in a script NVDA crashes.

I think DaVid has given me the solution: use gui.runScriptModalDialog instead of dlg.ShowModal. I will try it and tell you.

El 21/08/2022 a las 14:16, Abdel escribió:

Hi Javi,

For me, the following three instructions entered in the Python console of NVDA work well, maybe you did not specify the parent?

import gui
fileDialog = wx.FileDialog(gui.mainFrame, message="Test", wildcard=("Text (*.txt)"), defaultDir="c:", style=wx.FD_OPEN)

Hope this helps.

Kind regards,
Le 21/08/2022 à 11:42, Javi Domínguez a écrit :


Does anyone know why I can't use a wx.FileDialog in a globalPlugin script? NVDA crashes. However, elsewhere, for example calling it from the NVDA menu it works perfectly.


Join { to automatically receive all group messages.