Struggling to get NPPExec 64 to run Lua



  • I had this working at one point, but had a catastrophic failure of that drive and I’m having to recreate it from notes.

    Windows 10 Home 64-bit

    1709 build 16299.306

    Notepad++ 64-bit version 7.5.6
    NPPExec 64-bit version 0.5.9.9

    I added the path to my Lua runtime module to the system PATH variable and tested that this works by typing lua53.exe in a command line - the runtime opens just fine.

    I’m using this as the command set to try to run whatever code is in the current window in N++ through NPPExec:

    SET INTERPRETER=lua53.exe
    SET exec="$(INTERPRETER)" “$(FULL_CURRENT_PATH)”
    NPP_SAVE
    $(exec)
    if $(EXITCODE) != 0 goto exit
    NPP_CONSOLE 0
    NPP_RUN cmd /C “cmd /C $(exec) && pause”
    :exit

    That just flashes by so fast that I can’t see what’s happening, but certainly the code isn’t running.

    I altered it to this . . .

    SET INTERPRETER=lua53.exe
    SET exec="$(INTERPRETER)" “$(FULL_CURRENT_PATH)”
    NPP_SAVE
    $(exec)
    if $(EXITCODE) != 0 goto exit
    NPP_CONSOLE 0
    NPP_RUN cmd /C “cmd /K $(exec) && pause”
    :exit

    . . . so I could get at least some idea of what was happening and what I see when it runs is a CMD window with a title line that reads exactly this way . . .

    C:\Windows\System32\cmd.exe

    . . . with this in the body of the window:

    The filename, directory name, or volume label syntax is incorrect.

    D:\Programs\Notepad++>

    If I remove the last part of the exec definition . . .

    SET INTERPRETER=lua53.exe
    SET exec="$(INTERPRETER)"
    NPP_SAVE
    $(exec)
    if $(EXITCODE) != 0 goto exit
    NPP_CONSOLE 0
    NPP_RUN cmd /C “cmd /K $(exec) && pause”
    :exit

    . . . the cmd window opens directly into my lua runtime, so I know that the command is correctly set for my runtime.

    Returning to the “normal” run, when I get to the cmd window, I entered the command that NPPExec was supposed to be sending manually from that point as follows . . .

    D:\Programs\Notepad++>lua53.exe "F:\ProjectFile\Test Folder\TestCode.lua"

    . . . which, when executed produced the results I would have expected to have shown up in my Notepad++ console . . .

    Hello, world!

    D:\Programs\Notepad++>

    . . . so I know the string that defines the full path to the subject file (the one in the “current” window when I invoke NPPExec), when manually entered works.

    I tried leaving a message at SourceForge at the NPPExec site, but there hasn’t been a response in more than a week and I’m at the limit of my understanding of how to manipulate the command list involved here. My old implementation of NPPExec within Notepad++ looked very much like what I have in place now.

    I’m sure I’m doing something wrong, something subtle, but I have no idea what.

    Can anyone guide me to fixing this?







  • My apologies. I thought I had both site’s forums set up to notify me by email when there was a response, but I was mistaken.

    I’ll look at getting that more recent version of NPPExec 64 and see if that solves my problem.