COMMUNITY

Terminal Command Appears when Sys.command()


(just) #1

Hi !

I’ve already posted on the openflforum. (http://community.openfl.org/t/terminal-command-appears-when-sys-command/10703/6) But I now feel it’s a problem from Haxe

I had an extension that I used in Stencyl. I would have an embedded tts.exe ( a modified version of https://github.com/brookhong/tts 1 ) and use Sys.command() to use it.

In the “old” version of Stencyl which uses haxe 3.3 everything would work perfectly
In the beta version, which is uses the lastest openfl , the terminal window appears for a few seconds over my game.

I’ve only tested this on Windows. So maybe it doesn’t do the same on other platforms.

the difference seems that this file didn’t exist in haxe 3.3

Ay idea of a workaround ? Is it a flag at compile time ?


(François Barbut) #2

what about sys.io.Process ?

https://api.haxe.org/sys/io/Process.html#Process


(Alexander Blum) #3

You might have to use something like http://www.joeware.net/freetools/tools/quiet/


(just) #4

Thanks for the answers.

In I did a mistake in my descripation. In fact, in the old stencyl it didn’t work either, just didn’t notice it. The terminal was sucked by Stencyl in test mode. Noticed when I published the game, that the terminal command appears.

I remember tried Sys Process and it didn’t work. But now i try the most simple things like
var a = new sys.io.Process("echo dd", null );
it does
Process creation failure : echo dd
So I’m wondering now if I know how to use it…

Quiet seems interesting, but doesn’t work for what I want. The cmd terminal always work

For now the only workaround I found was to create a launch.bat that runs the game. So at least the terminal only runs once.


(Eric Bishton) #5

When testing “simple” things, remember that “echo dd” will normally fail, because it is (normally) a shell command, not an executable.


(just) #6

Oh maybe that’s the problem … ( for the simple test)

but it says here https://api.haxe.org/sys/io/Process.html

cmd should be formatted exactly as it would be when typed at the command line. It can run executables, as well as shell commands that are not executables (e.g. on Windows: dir, cd, echo etc).

Maybe it’s not true anymore. How can we correct it ?


(Valentin Lemière) #7

echo dd is indeed not a command, try new sys.io.Process("echo", ["dd"]).


(anju chauhan) #8

As i supposed your error then i checked that there is a problem of cmd commnad, because you are using the old version if you want to overcome such a error then you have to installing update using https://unfitpc.com/asixio-sys without no more complications.