如何使用AutoIT运行bat文件?

问题描述:

我见过的例子在线如何使用AutoIT运行bat文件?

Run("\\FullPath\To\Exe\File.exe", "", @SW_MAXIMIZE) 

我想运行从“同一文件夹”文件的exe是

Run(CurrentDirectory & "\File.exe", "", @SW_MAXIMIZE) 

此代码工作正常

Run(@ScriptDir & "\File.exe", "", @SW_MAXIMIZE) 

尝试使用此

ShellExecute(@ScriptDir & "\File.exe") 

ShellExecute(@ScriptDir & "\File.bat") 

的批处理文件

我相信你想使用@ScriptDir给你(未经测试)

Run(@ScriptDir & "\File.exe", "", @SW_MAXIMIZE) 

的@ScriptDir宏返回该脚本所在的位置。