(Delphi)如何使用DosCommand组件? [英] (Delphi) How to use DosCommand Component?

查看:90
本文介绍了(Delphi)如何使用DosCommand组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Rad Studio Berlin 10上安装了 https://github.com/TurboPack/DOSCommand 更新2,但我找不到如何使用它.我已经尝试过使用它,并且我在Google上搜索了一些示例,但找不到任何示例.

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.

推荐答案

很遗憾,您的问题没有详细的描述.如果成功安装了组件,则它应该出现在组件面板中.请将其放置在表单上,​​在对象检查器中调整属性,然后调用 Execute .

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 : 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;

这篇关于(Delphi)如何使用DosCommand组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆