Lazarus: Run command and get output

PHOTO EMBED

Mon Aug 29 2022 18:09:38 GMT+0000 (UTC)

Saved by @marcopinero #lazarus

(* in form: Process, Memo, Button, Edit *)

procedure TForm1.Button1Click(Sender: TObject);
begin
  Process1.CommandLine:= Edit1.Text;
  Process1.Execute;
  Memo1.Lines.LoadFromStream(Process1.Output);
end;
content_copyCOPY