本帖最后由 偏见 于 2016-8-1 08:12 编辑
[code]Func _Main()
WinWait("物资录入","搜索前1000条")
WinActivate("物资录入")
ControlSetText("物资录入","","[CLASS:WindowsForms10.EDIT.app.0.190610d_r11_ad1; INSTANCE:3]","漏电保护开关")
ControlSetText("物资录入","","[CLASS:WindowsForms10.EDIT.app.0.190610d_r11_ad1; INSTANCE:2]","DZ158LE-10")
ControlClick("物资录入","搜索前1000条","[NAME:searchButton]")
Local $i
While 1
$i=ControlGetText ("[CLASS:WindowsForms10.Window.8.app.0.190610d_r11_ad1]","","WindowsForms10.Window.8.app.0.190610d_r11_ad115")
MsgBox(1,"1111",$i)
If StringInStr($i,"漏电保护开关")<>0 Then
ExitLoop
EndIf
WEnd
ControlClick("物资录入","确定","[NAME:sureButton]")
用工具可以看到,窗口里是有可见文本的,可是用msg输出后一直为空,什么情况?
==============================================
用WinGetText ()就行了 |