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 GitHub - brookhong/tts: A command line tool to read text with Microsoft Speech API (SAPI). 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 ?
You might have to use something like Quiet
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 );
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.
When testing “simple” things, remember that “echo dd” will normally fail, because it is (normally) a shell command, not an executable.
Oh maybe that’s the problem … ( for the simple test)
but it says here sys.io.Process - Haxe 4.2.1 API
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 ?
echo dd is indeed not a command, try
new sys.io.Process("echo", ["dd"]).
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.