lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Well, if you are doing this print + read routine only on windows, os.execute("pause") may be more windows-y.

On Sun, Sep 11, 2011 at 12:22 PM, Lorenzo Donati <> wrote:
On 11/09/2011 3.00, Jeff Pohlmeyer wrote:
For develoment/debugging purposes it might be helpful if the
window stayed open. But for a script written for everyday use,
many people would prefer something that does what it needs to
do and then gets out of the way. For the best of both worlds,
during development you could add this to the end of the script:

  print("Press [Return] to exit")

To improve on this you could do the following:

After setting the command for .lua files association as:

"path\to\lua\lua.exe" -e"CALLED_FROM_WIN_SHELL=true" "%1"

at the end of the script put:


   print("Press [Return] to exit")

 - Jeff

-- Lorenzo