如何通过函数获得对象的Index
下面的脚本是录制的:
Window SetContext, "Caption=C/C++ ", ""
TreeView Click, "ObjectIndex=1;\;ItemText="&mystring, "Location=Button"
但是,在回放的时候,有时候不成功,研究发现是ObjectIndex在变化,有时候ObjectIndex=1,而有时候ObjectIndex=2,请问ObjectIndex为什么在变化,另外如何通过函数获得ObjectIndex?
我的想法是将脚本修改如下:
dim my_object_index as integer
my_object_index = 通过某个函数获得对象的Index
Window SetContext, "Caption=C/C++ ", ""
TreeView Click, "ObjectIndex=+my_object_index;\;ItemText="&mystring, "Location=Button"
请问怎么修改?谢谢了先