找回密码
 加入
搜索
查看: 7785|回复: 21

[AU3基础] 如何选中需单击下拉的某个选项值?

 火.. [复制链接]
发表于 2012-7-6 13:46:09 | 显示全部楼层 |阅读模式
如何选中需单击下拉的某个选项值?
如图,框中有两个可以单击出现两项下拉的选项。我想第一项为不选择安装状态。怎么在这框查询不到按扭的ID?

本帖子中包含更多资源

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

×
发表于 2012-7-6 15:23:27 | 显示全部楼层
不是有控件ID吗
 楼主| 发表于 2012-7-6 16:45:25 | 显示全部楼层
那怎么让第一选项变为X不安装呢?希望提供一个思路就可以了
发表于 2012-7-6 17:21:49 | 显示全部楼层
本帖最后由 xlj310 于 2012-7-6 20:00 编辑

给个下载地址吧,我找了一个版本,结果是绿色版的,不用安装~晕 死

测试了一下,可以用controlclick()点击
发表于 2012-7-6 18:01:47 | 显示全部楼层
好久不搞安装的东西了 这个好像就只能模拟相对点击了吧?

关注一下 嘿嘿~
发表于 2012-7-6 22:41:07 | 显示全部楼层
回复 1# friendtasy
兄弟你使用NI是用于OCR吗?我有很多这个软件的硬件加密狗,没什么用!
 楼主| 发表于 2012-7-7 00:17:21 | 显示全部楼层
[虚拟电子实验室10.0].NI.Multisim.V10.0.1.汉化破解版.rar (244.81 MB)

下载地址是这个。软件哥只是负责批量安装的,貌似是电子设计相关的软件吧。
 楼主| 发表于 2012-7-7 00:19:09 | 显示全部楼层
给个下载地址吧,我找了一个版本,结果是绿色版的,不用安装~晕 死

测试了一下,可以用controlclick()点 ...
xlj310 发表于 2012-7-6 17:21



    这个应该是安装过程中才出现的吧。朋友说说是什么应用程序标题及控件ID
发表于 2012-7-7 10:46:33 | 显示全部楼层
本帖最后由 xlj310 于 2012-7-7 13:20 编辑

看你说的程序下载,我安装评估版并安装在E盘的源码为 (此程序不能覆盖安装)

Run("setup.exe")
WinWait("NI Circuit Design Suite 10.0.1","Install this product for evaluation")
WinActivate("NI Circuit Design Suite 10.0.1","Install this product for evaluation")
ControlCommand("NI Circuit Design Suite 10.0.1",'Install this product for evaluation','Button5',"Check", "");评估版本
ControlClick("NI Circuit Design Suite 10.0.1",'Install this product for evaluation',"Button2");下一步

WinWait("NI Circuit Design Suite 10.0.1","Destination Directory")
WinActivate("NI Circuit Design Suite 10.0.1","Destination Directory")
ControlSetText("NI Circuit Design Suite 10.0.1","Destination Directory","Edit5","e:\Program Files\National Instruments\")
ControlClick("NI Circuit Design Suite 10.0.1","Destination Directory","Button2")

WinWait("NI Circuit Design Suite 10.0.1","Directory for Support and Upgrade Utility")
WinActivate("NI Circuit Design Suite 10.0.1","Directory for Support and Upgrade Utility")
ControlClick("NI Circuit Design Suite 10.0.1","Directory for Support and Upgrade Utility","SysTreeView321","",1,60, 11)
BlockInput(1);锁定鼠标键盘,防止用户与脚本抢鼠标
$MousePos=MouseGetPos();记录当前鼠标位置
Opt("MouseCoordMode",0);设置屏蔽坐标为相对于激活窗口
MouseClick("",68,151,1,0);点击不安装
MouseMove($MousePos[0],$MousePos[1],0);将鼠标移回原处
BlockInput(0);释放鼠标键盘,以免影响正常使用
ControlClick("NI Circuit Design Suite 10.0.1","Directory for Support and Upgrade Utility","Button4")

WinWait("NI Circuit Design Suite 10.0.1","National Instruments软件许可协议")
WinActivate("NI Circuit Design Suite 10.0.1","National Instruments软件许可协议")
ControlCommand("NI Circuit Design Suite 10.0.1","National Instruments软件许可协议","Button10","Check", "")
ControlClick("NI Circuit Design Suite 10.0.1","National Instruments软件许可协议","Button2")

WinWait("NI Circuit Design Suite 10.0.1","I accept the above 2 License Agreement")
WinActivate("NI Circuit Design Suite 10.0.1","I accept the above 2 License Agreement")
ControlCommand("NI Circuit Design Suite 10.0.1","I accept the above 2 License Agreement","Button12","Check", "")
ControlClick("NI Circuit Design Suite 10.0.1","I accept the above 2 License Agreement","Button2")

WinWait("NI Circuit Design Suite 10.0.1","Adding or Changing")
WinActivate("NI Circuit Design Suite 10.0.1","Adding or Changing")
ControlClick("NI Circuit Design Suite 10.0.1","Adding or Changing","Button3")
$t1=TimerInit()
Do
        $t2=Int(TimerDiff($t1)/1000);秒
        ToolTip('这里可能需要两到三分钟'&@CRLF&"请耐心等待……        "&$t2)
Until WinWait("NI Circuit Design Suite 10.0.1","NI Circuit Design Suite 10.0.1 has been installed",1)
ToolTip('');清空提示
WinActivate("NI Circuit Design Suite 10.0.1","NI Circuit Design Suite 10.0.1 has been installed")
ControlClick("NI Circuit Design Suite 10.0.1","NI Circuit Design Suite 10.0.1 has been installed","Button3")

WinWait('NI Circuit Design Suite 10.0.1','You must restart your computer to complete this operatio')
WinActivate('NI Circuit Design Suite 10.0.1','You must restart your computer to complete this operatio')
ControlClick('NI Circuit Design Suite 10.0.1','You must restart your computer to complete this operatio',"Button3")

;安装完成
$t1=TimerInit()
Do
        $t2=5-Int(TimerDiff($t1)/1000);秒
        TrayTip("恭喜您!安装成功~ "&$t2,"NI Circuit Design Suite 10.0.1"&"安装完成!"&@crlf&"建议您立即 重启电脑 后开始试用!",1)
        Sleep(1000)
Until $t2<1



本帖子中包含更多资源

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

×

评分

参与人数 1金钱 +10 收起 理由
user3000 + 10 若只发解决问题的代码更好! 眼花啊!

查看全部评分

 楼主| 发表于 2012-7-7 13:18:20 | 显示全部楼层
非常感谢楼上的朋友,复制下来参考一下
 楼主| 发表于 2012-7-7 13:20:17 | 显示全部楼层
如何能自动安装协议文件和复制语言包过去就更好了。还得花点时间完善啊
 楼主| 发表于 2012-7-7 13:20:22 | 显示全部楼层
如何能自动安装协议文件和复制语言包过去就更好了。还得花点时间完善啊
发表于 2012-7-7 13:21:25 | 显示全部楼层
WinWait("NI Circuit Design Suite 10.0.1","Directory for Support and Upgrade Utility")
WinActivate("NI Circuit Design Suite 10.0.1","Directory for Support and Upgrade Utility")
ControlClick("NI Circuit Design Suite 10.0.1","Directory for Support and Upgrade Utility","SysTreeView321","",1,60, 11)
Opt("MouseCoordMode",0)
MouseClick("",68,151,1,0)

以上代码是可以解决楼主提出的问题,我也只是用mouseclick模拟点击,我这只抛砖引玉。
发表于 2012-7-7 13:44:49 | 显示全部楼层
如何能自动安装协议文件和复制语言包过去就更好了。还得花点时间完善啊
friendtasy 发表于 2012-7-7 13:20


自动安装协议文件可以安装完当前安装程序后继续安装;
    复制文件可以用FileCopy ( "源文件", "目标路径" [, 标志] )
 楼主| 发表于 2012-7-7 15:25:32 | 显示全部楼层
以上代码是可以解决楼主提出的问题,我也只是用mouseclick模拟点击,我这只抛砖引玉。
xlj310 发表于 2012-7-7 13:21



    这个就不能用CONTROLCLICK之类的?感觉模拟鼠标不是很稳定。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-28 03:23 , Processed in 0.102224 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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