(Delphi) How to use DosCommand Component? [closed]

2019-09-19 20:36发布

I have Installed https://github.com/TurboPack/DOSCommand on Rad Studio Berlin 10 update 2 but I cannot find out how to use it. I have tried playing around with it and I have searched through google looking for examples but I can't find any.

1条回答
ゆ 、 Hurt°
2楼-- · 2019-09-19 20:41

Unfortunately your question does not have a detailed description. If you have the component installed successfully it should appear in the component palette. Please place it on your form, adjust properties in object inspector and call Execute.

BTW have you read "How to use it" and "Example" comments in the unit header?

 *******************************************************************
  How to use it :
  ---------------
  - just put the line of command in the property 'CommandLine'
  - execute the process with the method 'Execute'

Example

  Example : Make a dir :
  ----------------------
  - if you want to get the Result of a 'c:\dir /o:gen /l c:\windows\*.txt'
  for example, you need to make a batch file
  --the batch file : c:\mydir.bat
  @echo off
  dir /o:gen /l %1
  rem eof
  --in your code
  DosCommand.CommandLine := 'c:\mydir.bat c:\windows\*.txt';
  DosCommand.Execute;
查看更多
登录 后发表回答