Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I run an executable using Lua?

Tags:

executable

lua

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.

like image 675
Brian T Hannan Avatar asked May 13 '10 18:05

Brian T Hannan


3 Answers

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

Example:

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

Sources: Lua Guide / os.execute

like image 165
Anthony M. Powers Avatar answered Dec 07 '22 04:12

Anthony M. Powers


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

like image 40
Doug Currie Avatar answered Dec 07 '22 04:12

Doug Currie


Use os.execute.

like image 37
interjay Avatar answered Dec 07 '22 04:12

interjay