[Lazarus] How can a program executing a command via TProcess detect an input prompt and create a graphical dialog for the input?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Jan 3 17:58:52 CET 2013

Frank Church schrieb:

> After further consideration I think what I am thinking of is a TProcess 
> like object that emulates a console, so it "types" the command and 
> receives input as well as prompts. Is there an FPC library that does 
> something like that?

You don't need a console. Simply create a bidirectional pipe, or two 
unidirectional ones, and connect it to the stdin/stdout of the process. 
Then parse what the process outputs, and when you find the prompt, send 
it your input.


More information about the Lazarus mailing list