Hi, I hope everyone is doing good.
I've been wondering if there is a way to switch the default text editor to something like NPP.
Well you see, whenever my NVDA focus is hovering over a selected NVgT script file, and I press the application key then move down to the edit option, or simply press the E key, Notepad opens up.
Is there a way to make it so that notepad plus plus is the one that opens up instead?
Thank you.
Hello.
As far as I know, if you have the NPP set to context menu associations during the installation of the NPP, you can press N instead of E to open with it.
Thank you for helping.
I just reinstalled NPP just to try what you said, but I did not come across any option for the context menu.
I'm using notepad plusplus v8.0, because any other newer version crashes whenever I run it with NVDA for some reason.
I tried something else to make it easier for me to run scripts like this:
When I press F5 in NPP the run script box comes on.
In the file path edit box I wrote:
nvgtw $(FULL_CURRENT_PATH)
Then I saved it and gave it a keyboard shortcut.
Now, everytime I hit the hotkey I assighned, the current script gets executed,. IT's nice and all but, a new problem appeared. Yey, exactly what I was craving.
Somehow the sound is mute when the script is executed through nPP, and I'm not good with CMD to figure it out, so yeah.
There is always a wall to crash into.
Hi,
The issue you're experiencing is that npp must not be setting the current directory of nvgtw.exe when it runs.
In your script's main file, you can include code like:
chdir(spec::path(SCRIPT_CURRENT_FILE).make_parent());
To insure that the working directory gets set to that containing the script, which should allow sounds to load properly.
If you want to change the editor itself though, you can:
- Open regedit.exe in the run dialog.
- Browse to
HKEY_CLASSES_ROOT\NVGTScript\shell\edit\command
- Tab to the value list and you'll see something like: (Default); Type: REG_SZ; Data: "notepad" "%1" 1 of 1. You can change this value to point to the path of any executable on your system.
At least notepad2 had an option to replace notepad all around right at install time, not sure if notepad plus plus has this though.
Anyway hope this helps!
Fixed and fixed.
Both of the methods workk just fine, thank you for the help.
But I have a question, is the thing with not loading the sounds properly a problem with nvgt that will be fixed in the future, or is it something els.
Cuz you see, I tryed the same with bgt and it doesn't require that extra line. Just curious.
Thanks again for all the help, and good day to all.