autoit注册方法
2015-08-22 11:33
267 查看
python使用win32com调用autoit时候
>>> auto = Dispatch("AutoItX3.Control")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in
Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,c
lsctx)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 108, in
_GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 85, in _
GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.II
D_IDispatch)
pywintypes.com_error: (-2147221005, '\xce\xde\xd0\xa7\xb5\xc4\xc0\xe0\xd7\xd6\xb
7\xfb\xb4\xae', None, None)
需要在系统中先注册autoit的的dll,在管理员权限下运行以下两条命令:
REGSVR32 /S AutoItX3.dll
REGSVR32 /S AutoItX3_x64.dll(64位操作系统下需要两个都注册,32位只注册32位的dll即可)
>>> auto = Dispatch("AutoItX3.Control")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in
Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,c
lsctx)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 108, in
_GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 85, in _
GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.II
D_IDispatch)
pywintypes.com_error: (-2147221005, '\xce\xde\xd0\xa7\xb5\xc4\xc0\xe0\xd7\xd6\xb
7\xfb\xb4\xae', None, None)
需要在系统中先注册autoit的的dll,在管理员权限下运行以下两条命令:
REGSVR32 /S AutoItX3.dll
REGSVR32 /S AutoItX3_x64.dll(64位操作系统下需要两个都注册,32位只注册32位的dll即可)
相关文章推荐
- Android之自定义Toast
- iOS单例模式
- linux 下eclipse配置apache服务器,选中server时server name为灰色状态
- CentOS基本命令学习
- 编译linux内核时出现"mkimage" command not found - U-Boot images will not be built错误的解决办法
- 软件工程测试方法之——划分方式及内容
- SQL日期时间函数
- C语言编程技巧----如何定义全局变量----->提高代码可移植性
- Cluster
- 第89讲:Scala中使用For表达式实现内幕思考
- 启动Java Web项目时提示错误:A child container failed during start
- initialize方法和init区别详解
- 投资问题,lingo程序
- 【LeetCode】257. Binary Tree Paths
- Android通过Http连接MySQL 实现登陆/注册(数据库+服务器+客户端)
- 173
- mysql mysqli处理事务
- Ehcache 整合Spring 使用页面、对象缓存
- cocos2d-js 2048带动画实现
- Girls' research - HDU 3294 (Manacher处理回文串)