@waskoma said in Cant change cursor color, and latest version shortcut to start batch file claims it cant find it:
<Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="87"> c:\64start.bat $(FILE_NAME) $(NAME_PART).prg "$(CURRENT_DIRECTORY)"</Command>
I cannot replicate the problem (so far)
content of c:\64start.bat:
@echo ran command `%0 %*` @pausecontent of shortcuts.xml entry:
<Command name="Waskoma Command" Ctrl="no" Alt="yes" Shift="no" Key="87">c:\64start.bat $(FILE_NAME) $(NAME_PART).prg "$(CURRENT_DIRECTORY)"</Command>I tried with two files each, once with v8.4.1 and once with v8.9.2.
For ...\FileNameNoSpaces.txt:
v8.4.1 results: ran command `"C:\64start.bat" FileNameNoSpaces.txt FileNameNoSpaces.prg "C:\usr\local\apps\npp\npp.8.4.1.waskoma"` Press any key to continue . . . v8.9.2 results: ran command `"C:\64start.bat" FileNameNoSpaces.txt FileNameNoSpaces.prg "C:\usr\local\apps\npp\npp.8.9.2.waskoma"` Press any key to continue . . .For ...\File Name With Spaces.txt:
v8.4.1 results: ran command `"C:\64start.bat" File Name With Spaces.txt File Name With Spaces.prg "C:\usr\local\apps\npp\npp.8.4.1.waskoma"` Press any key to continue . . . v8.9.2 results: ran command `"C:\64start.bat" File Name With Spaces.txt File Name With Spaces.prg "C:\usr\local\apps\npp\npp.8.9.2.waskoma"` Press any key to continue . . .So both worked for me, and Notepad++ had no trouble running the 64start.bat, whether in v8.4.1 or v8.9.2
However, this works on the assumption that there wasn’t really the newline before c:\64start.bat in your XML. It shouldn’t matter, but it also shouldn’t be there; so if there is the extra newline, delete it.
Also, my test works on the assumption that your 64start.bat will do the “right thing” with spaces in the filename without quotes, which I am highly dubious of. My working theory is that the problem is actually either the missing quotes, or something that’s being called inside your batch file.
Notepad++ has been undergoing changes in which XML reader library it is using for parsing the config files like shortcuts.xml… so if you’ve actually got that newline, or if you have more entities than " which you haven’t told us about, it might be behaving differently between the two, and that might explain the difference in behavior.
As an experiment, if removing the newline wasn’t enough to fix it, you might want to try renaming your 64start.bat and putting in a new version that’s got my contents. If it properly runs and gives similar results to what I showed in my experiment, then the problem is likely the quoting. If it doesn’t properly run, even though you are using the same <Command...> entry, then I am betting you edited your command entry before posting it here, and whatever you edited out is the culprit.