lua-users home
lua-l archive

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

On Sep 10, 2011 7:54 PM, "Elias Barrionovo" <> wrote:
> I'm not a big windows user / developer, but perhaps a batch script that
> callas lua.exe for your script and then uses the command 'pause'?
> On Sat, Sep 10, 2011 at 8:09 PM, Phillip Richcreek <>wrote:
>> The file association for lua scripts (.lua) is set up to use lua.exe.
>> When I double-click a .lua file, a window comes up and almost
>> immediately disappears; I'm unable to see the script's PRINT output.
>> How can I make double-clicking a .lua file bring up a cmd window that
>> doesn't immediately disappear?
>> TIA,
>> Phil

The way that Lua for Windows (LfW) expects you to learn and develop Lua is to use SciTE. SciTE is a small light text editor that supports debugging. It comes as part of LfW Just right-click on the .lua file and select 'edit'. This will open SciTE. Now you can view the code and run it. I believe the keyboard shortcut for "run" is F5. Then SciTE will show you the output of the script at the bottom.

Now once you have fully developed the script you can just double-click on the .lua file to run it.

Another option is to just 'Start/Run/cmd'. This will ope a�command�prompt. In that command prompt just change directories (cd) into the directory where the .lua file exists. Then you can simply run it by typing the name of the file. (e.g. $ my_file.lua)

Hope this helps.