socc3rpr0
7 years agoOccasional Contributor
How Do I Find A Mapped Object When It's Values Change
I have mapped an object on the screen, but every time I launch the desktop application and want to click on the object it can't find it because its WPFControlText string changes everytime. The object is mapped the following way:
function ReceiveAllSettings() { var btn = Aliases["Architect"]["HwndSource_ShellView"]["ShellView"]["RibbonWindowContentHost"]["MousePanningDecorator"]["NewPaneNotifyingXamDockManager"]["SplitPane"]["TabGroupPane"]["MultiSelectTreeView"]["TreeviewitemIdVenuecollectionkey8275cba680"]["StackPanel"]["StackPanel"]["Button"]["Image"]; btn["Click"](); }
The property that always changes is "TreeviewitemIdVenuecollectionkey8275cba680" specifically the numbers I highlighted in red and everything else stays the same. How would I go about finding this particular object every time I launch my application? Any guidance will be appreciated.