|
Sub ReportRectangle(obj)
x = obj.GetTOProperty("x")
y = obj.GetTOProperty("y")
w = obj.GetTOProperty("width")
h = obj.GetTOProperty("height")
Reporter.ReportEvent micDone, obj.ToString() & " dimensions", "The Virtual object " & obj.ToString() & " is defined using the following dimensions: " & x & ", " & y & ", " & x+w & ", " & y+h
End Sub
'Sample usage
ReportRectangle Window("Flight Reservation").WinButton("FLIGHT")
这段代码是模仿对象模型中的方法,但运行的时候出现错误提示:无效的过程调用或参数。具体的为: Line (6): "y = obj.GetTOProperty("y")".
有人知道为什么吗?先谢了 |
|