找回密码
 加入
搜索
查看: 3394|回复: 6

[AU3基础] listview选中状态失效咋回事(已解决)

[复制链接]
发表于 2014-4-16 09:31:37 | 显示全部楼层 |阅读模式
本帖最后由 www1970 于 2014-4-21 10:50 编辑

制作加密软件TrueCrype(http://www.truecrypt.org/downloads可下载)自动加载程序时,在选择分区时,可以选中最后一个加密分区,但是“确定”按钮点击时,分区选择失效,这问题咋解决呀!
见下图
1、选中最后一个隐藏分区

2、点击“OK”按钮后

代码如下:
;启动truecrypt
Run("C:\Program Files\TrueCrypt\truecrypt.exe")
;界面启动后选择“选择设备”
WinWaitActive("TrueCrypt","Select D&evice...")
Send("!e")
;出现分区选择界面,选择最后一个分区
WinWait("Select a Partition or Device")
$itm=ControlListView("Select a Partition or Device","","SysListView321","GetItemCount")
ControlFocus("Select a Partition or Device","","SysListView321")
ControlListView("Select a Partition or Device","","SysListView321","Select",$itm-1)
;点击“OK”按钮
ControlFocus("Select a Partition or Device","","Button2")
ControlClick("Select a Partition or Device","","Button2")

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2014-4-16 16:54:30 | 显示全部楼层
请求增援!
 楼主| 发表于 2014-4-17 09:12:10 | 显示全部楼层
高手请帮忙!
 楼主| 发表于 2014-4-17 13:07:29 | 显示全部楼层
是这问题太低级了,高手不屑于回答,还是没碰到过不知如何解决呀?
俺很郁闷呀!
刚学就碰到这难题
发表于 2014-4-20 00:28:43 | 显示全部楼层
回复 1# www1970


    我也是新手。你这样选择不行的话,我换个思路,就是获取listview选中的文本,直接输入。你试试看
Run("C:\Program Files\TrueCrypt\truecrypt.exe")

WinWaitActive("TrueCrypt","Select D&evice...")

ControlClick("TrueCrypt","Select D&evice...","Select D&evice...")

WinWait("Select a Partition or Device")
$itm=ControlListView("Select a Partition or Device","","SysListView321","GetItemCount")

$Device= ControlListView("Select a Partition or Device","","SysListView321","GetText",$itm-1)

ControlClick("Select a Partition or Device","","Cancel")

WinWaitActive("TrueCrypt","Select D&evice...")

ControlSetText("TrueCrypt","Select D&evice...","Edit1",$Device)
 楼主| 发表于 2014-4-21 10:49:20 | 显示全部楼层
回复 5# 121044246


    这个方法成功了,谢谢!!!!
发表于 2014-4-21 23:55:42 | 显示全部楼层
回复 6# www1970


    呵呵,可以就好。一起学习
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-17 01:31 , Processed in 0.080521 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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