#AutoItX4Java
[AutoIt](http://www.autoitscript.com/autoit3/index.shtml) is a very useful automation scripting language for Microsoft Windows. It allows for GUI automation using a very simple syntax and can be useful for testing Windows applications. It is packaged with AutoItX which supports accessing AutoIt functions through COM objects.
AutoItX4Java uses [JACOB](http://sourceforge.net/projects/jacob-project/) to access AutoItX through COM and strives to provide a native Java interface while maintaining the simplicity of AutoIt. Getting started is simple.
1. Download [JACOB](http://sourceforge.net/projects/jacob-project/).
2. Download and install [AutoIt](http://www.autoitscript.com/autoit3/index.shtml).
3. Add jacob.jar and autoitx4java.jar to your library path. Note that this project (autoitx4java.jar) is comprised of one code file so you can alternatively just include AutoItX.java in lieu of autoitx4java.jar.
4. Place the jacob-1.15-M4-x64.dll file in your library path.
5. Start using AutoItX.
###Example
```
File file = new File("lib", "jacob-1.15-M4-x64.dll"); //path to the jacob dll
System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath());
AutoItX x = new AutoItX();
String notepad = "Untitled - Notepad";
String testString = "this is a test.";
x.run("notepad.exe");
x.winActivate(notepad);
x.winWaitActive(notepad);
x.send(testString);
Assert.assertTrue(x.winExists(notepad, testString));
x.winClose(notepad, testString);
x.winWaitActive("Notepad");
x.send("{ALT}n");
Assert.assertFalse(x.winExists(notepad, testString));
```
####Troubleshooting
Both AutoItX3 and Jacob dll's come in x86 and x64 versions. Ensure you use the correct dlls.
If AutoItX isn't disposing itself properly make a call to ComThread.Release() when you are done using AutoItX.
Refer to JACOB documentation: [JacobThreading](http://danadler.com/jacob/JacobThreading.html) and [Object Lifetime](http://danadler.com/jacob/JacobComLifetime.html)
####Note
If you do not want to install AutoIt, you can just grab AutoItX3.dll and register it with: regsvr32.exe AutoItX3.dll
AutoItX4Java is comprised of one file so you can either use the jar or copy the .java file into your source.
If you get errors like: "Can’t co-create object" then ensure you have the AuotItX dll registered. If you need to manually register the 64 bit version, use: "\Windows\SysWOW64\regsvr32.exe AutoItX3_x64.dll" otherwise use "regsrv32.exe AutoItX3.dll".
####Warning
AutoItX4Java is not completely tested. Use at your own risk.
没有合适的资源?快使用搜索试试~ 我知道了~
AutoItX4Java
共33个文件
html:26个
java:1个
css:1个
3星 · 超过75%的资源 需积分: 31 69 下载量 57 浏览量
2016-09-01
19:49:33
上传
评论
收藏 100KB ZIP 举报
温馨提示
自动化工具包,通过对AutoIt进行封装,得到了AutoItX组件,此资源提供了Java到AutoItX的调用方式,适合在Java项目中继承AutoIt功能,完成WindowS GUI 的自动化操作
资源推荐
资源详情
资源评论
收起资源包目录
autoitx4java-master.zip (33个子文件)
autoitx4java-master
dist
AutoItX4Java.jar 44KB
javadoc
package-list 14B
deprecated-list.html 5KB
help-doc.html 9KB
allclasses-frame.html 802B
index.html 1KB
allclasses-noframe.html 782B
resources
inherit.gif 57B
stylesheet.css 1KB
constant-values.html 15KB
index-files
index-10.html 10KB
index-7.html 9KB
index-11.html 11KB
index-1.html 7KB
index-8.html 12KB
index-9.html 9KB
index-6.html 7KB
index-5.html 6KB
index-3.html 35KB
index-2.html 6KB
index-13.html 25KB
index-4.html 7KB
index-12.html 6KB
overview-tree.html 5KB
autoitx4java
AutoItX.html 280KB
package-summary.html 6KB
package-frame.html 915B
class-use
AutoItX.html 5KB
package-tree.html 5KB
package-use.html 5KB
LICENSE.txt 1KB
src
autoitx4java
AutoItX.java 119KB
README.md 3KB
共 33 条
- 1
资源评论
- yingjiewudi2019-05-05感觉没什么用
- 普通网友2017-11-21好非常好 nice
shb19891
- 粉丝: 6
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功