www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Hided Subprocess in Dlang

reply Baby Beaker <thegrapevine email.com> writes:
I am creating a program in Dlang with graphical user interface. I 
want this program to run a hidden sub-process in the background. 
But when I click the program to run this process using spamShell 
or executeShell, open the command prompt console running this 
other process. Please help me.
May 02 2020
parent reply Adam D. Ruppe <destructionator gmail.com> writes:
On Saturday, 2 May 2020 at 14:06:55 UTC, Baby Beaker wrote:
 open the command prompt console running this other process.
when calling the functions pass Config.suppressConsole to it. like in the doc example here http://dpldocs.info/experimental-docs/std.process.Config.html#suppressConsole
May 02 2020
parent reply Baby Beaker <thegrapevine email.com> writes:
On Saturday, 2 May 2020 at 15:20:36 UTC, Adam D. Ruppe wrote:
 On Saturday, 2 May 2020 at 14:06:55 UTC, Baby Beaker wrote:
 open the command prompt console running this other process.
when calling the functions pass Config.suppressConsole to it. like in the doc example here http://dpldocs.info/experimental-docs/std.process.Config.html#suppressConsole
Error: none of the overloads of `spawnProcess` are callable using argument types `(string, File, File, File, Config)`, candidates are:
May 02 2020
parent reply Adam D. Ruppe <destructionator gmail.com> writes:
On Saturday, 2 May 2020 at 15:37:09 UTC, Baby Beaker wrote:
 Error: none of the overloads of `spawnProcess` are callable 
 using argument types `(string, File, File, File, Config)`, 
 candidates are:
The example is prolly out of date try spawnProcess(program, null, Config.suppressConsole)
May 02 2020
parent Baby Beaker <thegrapevine email.com> writes:
On Saturday, 2 May 2020 at 15:42:20 UTC, Adam D. Ruppe wrote:
 On Saturday, 2 May 2020 at 15:37:09 UTC, Baby Beaker wrote:
 Error: none of the overloads of `spawnProcess` are callable 
 using argument types `(string, File, File, File, Config)`, 
 candidates are:
The example is prolly out of date try spawnProcess(program, null, Config.suppressConsole)
Working very well! Thank you! A simple example using spawnShell just open notepad.exe without console. spawnShell("notepad.exe", null, Config.suppressConsole);
May 02 2020