Hide console window on OS.execute

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By stevenkucera

I use OS.execute("./myexternalprog", args, true, output) as part of game to call AI.

Works fine on all platforms within Godot.

But when exporting project on Windows (and only Windows), a console window is opened up to run the AI program, interfering with the user’s experience.

Can this console be hidden or prevented from appearing at all?

Steve

I’m not sure if this console is opened by Godot or by the application you are running… either way I don’t know how to prevent that. Maybe you could ask for that option on Github but the answer might be very OS-specific. I’m curious how to do it as well.

Zylann | 2019-08-23 12:36

Looks like this is one way to do it. Hopefully it’s still relevant: Reddit - Dive into anything

Update: looking more closely at the pull request, seems to be merged?

Eric Ellingson | 2019-08-23 13:41