Reputation: 3171
I am creating a lua script that makes creating scripts for a game easier, I would like to, after creating the desired file.lua, for windows to execute and open that file.
Is it possible?
Ok, what i need is to os.execute() a lua file and open it in windows using the default .lua reader.
Upvotes: 2
Views: 1416
Reputation: 26794
os.execute('filename.lua')
should open the file in the default application registered for .lua extension. The first value returned will be true
if successful. It will keep the console window open though; if you want to avoid it, use something like this instead:
os.execute('start "" filename.lua')
Upvotes: 3