SOLVED: need help running code from Notepad++ with the NppExec plugin
#1
Hey everyone.

A while ago I asked about setting up Notepad++ to compile/debug QB64 code, and TempodiBasic graciously provided some instructions which I finally got around to trying out, only it's not (fully) working.

I'm running Windows 10 Pro with QB64 2.0.2, and Notepad++ which self-updated to v8.3.3 today and works fine. 
Per the instructions, I installed the NppExec plugin, and added the QB64 folder to the system path, and rebooted.

I have a "hello world" program in my qb64 folder, e.g.
  • C:\Users\{username}\Documents\Code\qb64\programs\hello1.bas

which is opened in Notepad++. 
I went in the Plugin menu and selected NPPExec, and configured it per the instructions
checking the options Show NppExec Console, Console Command History and Follow $(CURRENT_DIRECTORY).

Then with my program open in the editor, I pressed F6 for "Execute NppExec Script..."
and a command window opened.

I typed the command:
Code: (Select All)
QB64.EXE -c "$(FULL_CURRENT_PATH)" -o "$(FULL_CURRENT_PATH)"
NPP_RUN $(CURRENT_DIRECTORY) && $(NAME_PART) && ".exe"

and saved it, and clicked OK.

A DOS window opens and it looks like QB64 is compiling my code
(so far so good) and then Windows opens the \qb64\programs\ folder in Explorer,
and I can see my program now has an EXE file created with the current date/time. 

In Notepad++, the NppExec console has:

QB64.EXE -c "C:\Users\{username}\Documents\Code\qb64\programs\hello1.bas" -o "C:\Users\{username}\Documents\Code\qb64\programs\hello1.bas"
Process started (PID=8892) >>>
<<< Process finished (PID=8892). (Exit code 0)
NPP_RUN: C:\Users\{username}\Documents\Code\qb64\programs && hello1 && ".exe"
================ READY ================

The problem is the EXE is compiled but not being run (I have to double-click on it to actually execute it, and it does work).

Is there anything I should change or add to the F6 command to make NppExec actually run the code once it's compiled?

I checked my Windows Security & antivirus and am not seeing any warnings or anything, so I don't think that's the issue.

Any help much appreciated...
Reply


Messages In This Thread
SOLVED: need help running code from Notepad++ with the NppExec plugin - by madscijr - 05-06-2022, 03:04 PM



Users browsing this thread: 3 Guest(s)