如何选中需单击下拉的某个选项值?
如何选中需单击下拉的某个选项值?如图,框中有两个可以单击出现两项下拉的选项。我想第一项为不选择安装状态。怎么在这框查询不到按扭的ID? 不是有控件ID吗 那怎么让第一选项变为X不安装呢?希望提供一个思路就可以了 本帖最后由 xlj310 于 2012-7-6 20:00 编辑
给个下载地址吧,我找了一个版本,结果是绿色版的,不用安装~晕 死
测试了一下,可以用controlclick()点击 好久不搞安装的东西了 这个好像就只能模拟相对点击了吧?
关注一下 嘿嘿~ 回复 1# friendtasy
兄弟你使用NI是用于OCR吗?我有很多这个软件的硬件加密狗,没什么用! ed2k://|file|%5B%E8%99%9A%E6%8B%9F%E7%94%B5%E5%AD%90%E5%AE%9E%E9%AA%8C%E5%AE%A410.0%5D.NI.Multisim.V10.0.1.%E6%B1%89%E5%8C%96%E7%A0%B4%E8%A7%A3%E7%89%88.rar|256701100|a773685db89647b909253af69e2e8bea|h=2li7kfjr7s4nn4ee2c5c555me77vbegs|/
下载地址是这个。软件哥只是负责批量安装的,貌似是电子设计相关的软件吧。 给个下载地址吧,我找了一个版本,结果是绿色版的,不用安装~晕 死
测试了一下,可以用controlclick()点 ...
xlj310 发表于 2012-7-6 17:21 http://www.autoitx.com/images/common/back.gif
这个应该是安装过程中才出现的吧。朋友说说是什么应用程序标题及控件ID 本帖最后由 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,$MousePos,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
非常感谢楼上的朋友,复制下来参考一下{:face (356):} 如何能自动安装协议文件和复制语言包过去就更好了。还得花点时间完善啊 如何能自动安装协议文件和复制语言包过去就更好了。还得花点时间完善啊 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模拟点击,我这只抛砖引玉。 如何能自动安装协议文件和复制语言包过去就更好了。还得花点时间完善啊
friendtasy 发表于 2012-7-7 13:20 http://www.autoitx.com/images/common/back.gif
自动安装协议文件可以安装完当前安装程序后继续安装;
复制文件可以用FileCopy ( "源文件", "目标路径" [, 标志] ) 以上代码是可以解决楼主提出的问题,我也只是用mouseclick模拟点击,我这只抛砖引玉。
xlj310 发表于 2012-7-7 13:21 http://www.autoitx.com/images/common/back.gif
这个就不能用CONTROLCLICK之类的?感觉模拟鼠标不是很稳定。
页:
[1]
2