小智 8
{这是代码来做到这一点.使用TProcess对象!}
uses Process;
...
procedure DoProcess;
Var
Proc : TProcess;
Begin
Proc := TProcess.Create(nil);
try
Proc.CommandLine := '/Applications/MyApp.app';
PRoc.Options := Proc.Options + [poWaitOnExit];
Proc.CommandLine := Proc.CommandLine + ' -someparam';
PRoc.Execute;
finally
Proc.free;
end;
End;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4197 次 |
| 最近记录: |