Forum Discussion

DKumar04's avatar
DKumar04
Contributor
6 years ago

Solution for changing full name of an object

Sys.Process("YYY").WPFObject("HwndSource: ControlRoot").WPFObject("ControlRoot").WPFObject("DockPanel", "", 1).WPFObject("mainGrid").WPFObject("MenuControlHost").WPFObject("Control_ROOT").WPFObject("...
  • tristaanogre's avatar
    tristaanogre
    6 years ago

    dmiscannon wrote:
     If just the number is changing, replace the number with * which is a wild card to handle situations like this.

     

    Normally, I'd suggest this, but that doesn't guarentee that you'll get the CORRECT object.  If there's more than one, differentiated only by the index, then using the wildcard will return an ambiguous object recognition warning and, potentially, have the automation fail because the correct object could not be accessed.