In this post I will
cover the procedure of AutoIT script execution with the help of ant
build tool. As we know ant has java based library. But here I have set AutoIT
compiler with Ant's build.xml file and can execute AutoIT scripts
- Ant path must be set in to system environment variable.
- AutoIT installation directory path must be set in to system environment variable.
<?xml version="1.0"?>
<project name="Sample AutoIT Project" default="MyTest"
basedir=".">
<target
name="MyTest" depends="CreateLog">
<echo
message="Execution started of ScriptName"/>
<exec
dir="." executable="cmd" failonerror="true">
<arg
line="/c AutoIt3.exe ScriptName.au3"/>
</exec>
</target>
</project>
Where “ScriptName” is your AutoIT script.
Thanks for the blog. Its helped me in a lot.
ReplyDeleteHi I would like to fail the ant build, if any error in autoit script. So can I do that ? Ex: if winexits returns false, i want to fail the build but continue with the script.
ReplyDeleteAny suggestions?