Community
    • Login

    Struggling to get NPPExec 64 to run Lua

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    notepad++ 7.5.6nppexec 64-bit
    4 Posts 3 Posters 2.5k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Mark TinneyM Offline
      Mark Tinney
      last edited by Mark Tinney

      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?

      1 Reply Last reply Reply Quote 0
      • chcgC Offline
        chcg
        last edited by

        You may want to check out https://notepad-plus-plus.org/community/topic/15294/nppexec-v0-6-beta-1-has-been-realeased for 64bit.

        1 Reply Last reply Reply Quote 0
        • Vitaliy DovganV Offline
          Vitaliy Dovgan
          last edited by

          Hasn’t it already been answered here? –
          https://sourceforge.net/p/npp-plugins/discussion/672146/thread/98d3ee49/

          1 Reply Last reply Reply Quote 0
          • Mark TinneyM Offline
            Mark Tinney
            last edited by

            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.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors