运行() 和 ShellExecute() 之间的区别
Difference between Run() and ShellExecute()
我想通过 AutoIt 在 Windows 上的 shell/terminal 中执行某些操作。我知道有两种方法可以做到这一点。例如:
Run(@ComSpec & " /c " & $myCommand, "", @SW_HIDE)
;and
ShellExecute($myCommand)
我不明白其中的区别;这两个功能都会做我想做的,但它们背后是什么?它们各有什么优点和缺点?
Run()
仅用于触发可执行文件。它需要程序的完整路径。
ShellExecute()
also accepts content files like .txt, .htm and .docx and will start the executable associated with it. The verb option can be used to control what action to perform on the file. It utilizes the Windows ShellExecute API.
参考文献:
AutoIt Wiki - FAQ - How can I run something that is not an exe file…
我想通过 AutoIt 在 Windows 上的 shell/terminal 中执行某些操作。我知道有两种方法可以做到这一点。例如:
Run(@ComSpec & " /c " & $myCommand, "", @SW_HIDE)
;and
ShellExecute($myCommand)
我不明白其中的区别;这两个功能都会做我想做的,但它们背后是什么?它们各有什么优点和缺点?
Run()
仅用于触发可执行文件。它需要程序的完整路径。
ShellExecute()
also accepts content files like .txt, .htm and .docx and will start the executable associated with it. The verb option can be used to control what action to perform on the file. It utilizes the Windows ShellExecute API.
参考文献:
AutoIt Wiki - FAQ - How can I run something that is not an exe file…