Do not run command line

1

Well, I'm doing a program with VCLua and I realized that after compiling, even with the graphical interface, it executes the mode command line, how do I prevent this? Running only the program. Compileri with SrLua. The program is basically this:

require("vcl")
form = VCL.Form("Form")
form._ = {position="podesktopcenter", width=480, height=240, caption="Compiler", BorderStyle="bsDialog"}
form:ShowModal()

    
asked by anonymous 01.11.2014 / 03:12

2 answers

4

Use wsrlua.exe instead of srlua.exe and the console will not open automatically.

The respective command line would look like this:

glue.exe wsrlua.exe meuscript.lua meuexecutavel.exe

Note that basically the executable used was changed. At webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/ the parent of the child @lhf :) makes a reference to the precompiled version for Windows, provided by Daniel Quintela .

More specifically, when writing this response, the current precompiled version was the SRLua 5.1, available at www.soongsoft.com/lhf/lua/5.1/srlua.tgz . The executable is in the release folder.

    
01.11.2014 / 11:13
0

For cases where you need to use os.execute , it opens a terminal window that is open because the execution occurs in the same one.

To get around this, one solution is to make use of the winapi library, where we can use the shell_exec() function that allows us to perform the same operation but without displaying the given terminal window be "suppressed."

    
01.11.2014 / 08:47