Xterm interception
Posted: Mon Jul 01, 2024 1:00 pm
How can I intercept the input information on the screen of a console program and display it in EditorGadget
For example, there is a console program:
There is a second program:
How to interception INPUT STRING from the first program in the EditorGadget window ?
For example, there is a console program:
Code: Select all
PrintN("Enter your name?:")
Input()Code: Select all
Compiler = RunProgram(#PB_Compiler_Home+"compilers/pbcompiler", "-h", "", #PB_Program_Open | #PB_Program_Read)
Output$ = ""
If Compiler
While ProgramRunning(Compiler)
If AvailableProgramOutput(Compiler)
Output$ + ReadProgramString(Compiler) + Chr(13)
EndIf
Wend
Output$ + Chr(13) + Chr(13)
Output$ + "Exitcode: " + Str(ProgramExitCode(Compiler))
CloseProgram(Compiler) ; Close the connection to the program
EndIf
MessageRequester("Output", Output$)