2

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.

1
  • I don't want to turn into an executable, i just want to open a file in windows Commented Jul 16, 2014 at 18:36

1 Answer 1

3

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')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.