Run a Lua script through the interpreter

Hello, how I can run a Lua script through the interpreter, so that the result is displayed in the Windows cmd console?


Do you have the interpreter installed on you PC?
If you had to call the interpreter from the command line, how does it look like?

I would build a solution by using this package:

thank you very much for giving me snoop, I have Lua 5.3.5 installed on my computer. I want Lua scripts to run like this.

My earlier suggestion still stands firm.
Please find a visual aid to help you configure the process-pallet package to execute Lua source files.
(download file for full resolution)

  • Configuration in pink
  • Usage in red
  • Green and yellow details command structure

Interpreter used for this demo:

thank you very much for your detailed answer with an illustration. I tried to do everything as it was written in the answer. here’s the video still Lua script does not run.

The configuration of your Windows is unexpected.
The system’s program file pointer points to the F drive, while LUA is installed on C drive.

Remedy: Change the GREEN underlined text to what your requirements are.

start cmd /k ""%ProgramFiles%""\lua\lua.exe {fileAbsPath}

start cmd /k C:\"Program Files"\lua\lua.exe {fileAbsPath}

I sincerely thank you for your invaluable help to me. now the interpreter adequately runs lua scripts. alas, for some reason it runs twice, I do not know why this happens? what is the reason for this. and if you press enter, the console window doesn’t close. video of what is happening I really need your advice on how to solve all this?