I am running a TProcess which is a process that normally executes in the terminal if I was running it not using Pascal. So far, I have been able to read the output by using
a := TStringList.create; a.loadFromStream(myProcess.output)
Now, I would like to modify the input; that is to say, I'd like to provide some input to the process that does the same thing as writing to the terminal would do.
myProcess.input.writeansistring('some string')
does not work, and to even try doing that took me a while to figure out. If anyone has any idea how I could provide commands to my TProcess, it would be greatly appreciated.
Try the docs:
https://www.freepascal.org/docs-html/current/fcl/process/tprocess.parameters.html
Try the docs:
https://www.freepascal.org/docs-html/current/fcl/process/tprocess.parameters.html
Unfortunately, I've been through the entire docs, and I believe such a procedure or ability exists in TProcess but at least to me it is unintuitive from reading the docs. The TProcess parameters add procedure is for adding modifiers to the executable. So you might run some executable with flags, and that is what parameters add. I am looking for adding input AFTER execution has already started.
myProcess.input.writeansistring('some string')
does not work, and to even try doing that took me a while to figure out. If anyone has any idea how I could provide commands to my TProcess, it would be greatly appreciated.
(why do people keep using this vague expression without details? we're not oracles, some of us even hate Oracle).Because they think they are in Delphi. ;)
Trying to date Pythia? Or her son Python? Sounds familiar... ;D(why do people keep using this vague expression without details? we're not oracles, some of us even hate Oracle).Because they think they are in Delphi. ;)