I have code like:
begin
RunProgram:=TProcess.Create(nil);
RunProgram.Commandline:='calc.exe';
RunProgram.Execute;
RunProgram.Commandline:='notepad.exe';
RunProgram.Execute;
RunProgram.Free;
end.
and I would like to put a sleep or delay after executing calc.exe
You had the right idea – it’s
Sleep.You may need to add the
Windowsunit (or possibly a different one – I’m not familiar with FreePascal’s unit arrangement) to yourusesclause to be able to compile theSleepfunction.