|
SystemUtil.Run "C:\WINDOWS\system32\calc.exe","","C:\WINDOWS\system32","open"
HightLight_All_Object Window("regexpwndclass:=SciCalc").WinButton("text:=1|2|3|4|5|6|7|8|9|0")
Function Get_All_Runtime_Objects(TestObject, RuntimeObjects)
Dim Parent, Desc, Props, PropsCount
If IsEmpty(TestObject.GetTOProperty("parent")) Then
Set Parent = Desktop
Else
Set Parent = TestObject.GetTOProperty("parent")
End If
Set Desc = Description.Create
Set Props = TestObject.GetTOProperties
PropsCount = Props.Count - 1
For i = 0 to PropsCount
Desc(Props(i).Name).Value = Props(i).Value
Next
Set RuntimeObjects = Parent.ChildObjects(Desc)
Get_All_Runtime_Objects = RuntimeObjects.Count
End Function
Function HightLight_All_Object(TestObject)
Dim allRuntimeObjects
Dim objIndex, objNum
objNum = Get_All_Runtime_Objects(TestObject, allRuntimeObjects)
For objIndex = 0 to ObjNum-1
allRuntimeObjects.Items(objIndex).Highlight
Next
End Function
以上我在运行到allRuntimeObjects.Items(objIndex).Highlight的时候,出现报错!!!!
报错信息请看附件!!!
各位大大,请给小第一点提示是什么原因引起的!!!谢谢 |
|