Page 2 of 2

Re: RunProgramConsole (windows only)

Posted: Sun Mar 01, 2026 8:13 pm
by Kwai chang caine
Aaaah ok !!!! :oops: Thanks 8)

Before i just know the Debug window..and live happy with her hand in the hand during decade 8)
But now..i'm really lost with all this windows and exe outside, i discover :oops: (Debug window, CallStack window,watch window, issue window, Debugger.exe, pbcompiler.exe, PureBasic_CompilationX.exe, etc ...) :shock:

Image

Re: RunProgramConsole (windows only)

Posted: Mon Mar 02, 2026 7:00 pm
by Kwai chang caine
I also wanted to know if this new super code replaces the other old one and amazing you had written

viewtopic.php?p=579279#p579279

, or if they work completely differently and can both be used depending on the situation.

Re: RunProgramConsole (windows only)

Posted: Tue Mar 03, 2026 8:16 am
by infratec
They are different :wink:

RunProgram( ) connects stdin, stdout and stderr to the program you are starting.
RunProgramConsole() connects stdin and stdout to the PseudoConsole (ConPTTY).

But you can do the same things with it. But there is no stderr available, but this has no effect for catching the output,
since stderr also appears on the console screen.

You should be able to replace RunProgram() with RunProgramConsole()

Re: RunProgramConPTY (windows only)

Posted: Wed Mar 04, 2026 8:19 am
by infratec
Sorry for the trouble:

I renamed the whole stuff to RunProgramConPTY and also removed the helper procedure RemoveANSIEscapeCodes() in a separate file.
This makes more sense.

Re: RunProgramConPTY (windows only)

Posted: Wed Mar 04, 2026 11:44 am
by Axolotl
Thanks infratec
You answered my question, now I understand.
Command Prompt vs. RunProgram Output

Re: RunProgramConPTY (windows only)

Posted: Wed Mar 04, 2026 1:43 pm
by Kwai chang caine
Master wrote:Sorry for the trouble:
You're kidding :shock: , I'm the one who should apologize for being so hopeless and never understanding anything, or being the last to understand. :oops:
It was like this throughout my entire school career... I made my friends laugh because I was always behind everyone else. :lol:
If I was lucky, I'd understand the first lesson when the teacher was on the third, and even then I was glad because often, I didn't understand it at all, and understanding the following ones... it was even worse. :|

Thanks a lot for have renaming and clarified the subject :wink:
I believe... :mrgreen: that i have understand this time :shock:

In all case...i keep your two splendids codes, which are too valuable in my eyes, since I love controlling all external applications and PCs via the network, i found that "MAGICAL" :shock:
The next time I come across a black rectangle that writes to me :mrgreen: , I'll try each and every one of the lovely codes you were kind enough to create 8) it would be a miracle if even one could resist the grand master INFRATEC :?