Retrieving Properties from Duplicate Objects
Is there a way to differentiate between objects of the same name in a .NET application? For example, if a container has 5 objects named "Button", is it possible to dictate which button to select? Since declaring ["WinFormsObject"]("Button") will just grab the first one... Thanks
Re: Retrieving Properties from Duplicate Objects
The WinFormsObject method has two implementations:
WinFormsObject(Name) and WinFormsObject(ClassName, Caption, Index). Although in your case the first implementation is used, the second one will work as well. You need to use the second implementation of the method since it identifies objects by a set of properties which is unique for each object. The method takes the following parameters:
1. ClassName - the name of the object's class. You can see it in the ClrClassName property of the object.
2. Caption - the text held by the object. Its value is stored in the WndCaption property.
3. Index - a zero-based index of the object. It is stored in the Index property.
Please see the "Window.WinFormsObject" help topic for details.
BTW, you can find more information here: