How do I run an executable using Lua?

前端 未结 3 1559
死守一世寂寞
死守一世寂寞 2020-11-29 12:06

I have an executable I want to run using Lua ... how do I do this?

Can\'t seem to find any documentation anywhere about this.

相关标签:
3条回答
  • 2020-11-29 12:28

    If you need the output of the program, use io.popen

    0 讨论(0)
  • 2020-11-29 12:37

    Use os.execute.

    0 讨论(0)
  • 2020-11-29 12:41

    You can use Lua's native 'execute' command.

    Example:

    os.execute("c:\\temp\\program.exe")
    

    Sources: Lua Guide / os.execute

    0 讨论(0)
提交回复
热议问题