Do not execute command line

Asked

Viewed 109 times

1

Well, I’m doing a show with Vclua and I realized that after compiling, even with the graphical interface, it runs the command line mode, how do I avoid that? Running only the program. I compiled it 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()

inserir a descrição da imagem aqui

2 answers

4


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

The command line would look like this:

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

Note that basically the executable used has been changed. In webserver2.tecgraf.Puc-rio.br/~lhf/ftp/lua/ the "father of the child" @lhf :) makes a reference to the pre-compiled version for Windows, provided by Daniel Quintela.

More specifically, when writing this response, the current pre-compiled version was 5.1 of Srlua, available on www.soongsoft.com/lhf/lua/5.1/srlua.tgz. The executable is in the folder release.

0

For cases where it is necessary to make use of the os.execute, the same opens a terminal window that is open because the execution takes place in the same.

To get around this, a solution is to make use of the library winapi, where we can use the function shell_exec() which allows us to perform the same operation but without displaying the terminal window as it is "deleted".

  • In my case I use nothing related to os, winapi continues to serve?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.