ControlGetText 无法获取文本[已解决]
本帖最后由 偏见 于 2016-8-1 08:12 编辑Func _Main()
WinWait("物资录入","搜索前1000条")
WinActivate("物资录入")
ControlSetText("物资录入","","","漏电保护开关")
ControlSetText("物资录入","","","DZ158LE-10")
ControlClick("物资录入","搜索前1000条","")
Local $i
While 1
$i=ControlGetText ("","","WindowsForms10.Window.8.app.0.190610d_r11_ad115")
MsgBox(1,"1111",$i)
IfStringInStr($i,"漏电保护开关")<>0 Then
ExitLoop
EndIf
WEnd
ControlClick("物资录入","确定","")
用工具可以看到,窗口里是有可见文本的,可是用msg输出后一直为空,什么情况?
==============================================
用WinGetText ()就行了 本帖最后由 偏见 于 2016-8-1 08:13 编辑
获取的是图中黑框部分,我那个while循环就是想判断如果已经搜索出结果了,就跳出循环,进行下一步操作. {:face (207):}
页:
[1]