找回密码
 加入
搜索
查看: 2645|回复: 2

[系统综合] 已解决!我的是win8.164位系统,加上#AutoIt3Wrapper_UseX64=n,造成 冲突怎么解决?

[复制链接]
发表于 2016-7-1 16:57:42 | 显示全部楼层 |阅读模式
本帖最后由 kingdsq 于 2016-7-2 17:11 编辑

这一段程序中,必须加上“#AutoIt3Wrapper_UseX64=n”,否则可以操作SysTreeView32控件的选择,但取不出节点的文字,加上本句后,顺利解决。
#Region ;**** 编译指令由 AutoIt3Wrapper 选项编译窗口创建 ****
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** 编译指令由 AutoIt3Wrapper 选项编译窗口创建 ****
$my = _oper_excel($opfile, 12, 16, "", 0)
MsgBox(0, "", $my)
Func _readcert();从民生U宝管理工具中读出证书号
        $nzhenshu_num = ControlTreeView("U宝-民生银行U宝管理工具", "", "SysTreeView321", "GetItemCount", "");获取顶部开始的所有子项目数
        $cert_hao = ""
        If $nzhenshu_num = 0 Then Return $cert_hao
        For $i = 0 To $nzhenshu_num - 1
                $cert_hao = $cert_hao & ControlTreeView("U宝-民生银行U宝管理工具", "", "SysTreeView321", "GetText", "#" & $i & "|#0") & "|"
        Next
        $cert_hao = StringLeft($cert_hao, StringLen($cert_hao) - 1)
        Return $cert_hao
EndFunc   ;==>_readcert
但上段程序中加上“#AutoIt3Wrapper_UseX64=n”后,下段原本运行正常的EXCEL 控
件程序中$of_excel.cells($oprow, $opcol + $of_i - 1).value = "中国"这句报出错,但只要把这条预编译指令去掉,EXCEL 控件读写都正常了:
$opfile = "z:\1.xlsx"
Local $of_excel = ObjCreate("Excel.application") ;VBS中是set oExcel = CreateObject("Excel.application")
$of_excel.workbooks.open($opfile)
$of_excel.visible = False
$of_excel.cells($oprow, $opcol + $of_i - 1).value = "中国"
$of_excel.ActiveWorkbook.saved = True
$of_excel.Workbooks.Close
$of_excel.quit
象这种有的控件需要加,有的控件加上后不能运行,这种冲突怎么解决呢?
多谢大家,换一种访问EXCEL单元格的方法问题已经解决了!但在改帖子的主题中改不成“已解决”呢!
发表于 2016-7-2 06:50:41 | 显示全部楼层
有没有试试禁用64位重定向
 #include <WinAPIFiles.au3>
_WinAPI_Wow64EnableWow64FsRedirection ( $bEnable )
 楼主| 发表于 2016-7-2 17:03:25 | 显示全部楼层
有没有试试禁用64位重定向
hnfeng 发表于 2016-7-2 06:50

试过了,不行。谢谢.不过用另一种EXCEL中的cells对象得到问题解决了。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-10 01:33 , Processed in 0.082748 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表