Forum Discussion

sergi's avatar
sergi
Contributor
11 years ago
Solved

Use FindChild for MenuItems with "_" in WPControlText

Hi, I want to use built-in FindChild function to find the items in the application menu. I'm trying the following tod o it the following way: Sys.Process("ApplicationNmae").FindChild(new ...
  • Ryan_Moran's avatar
    11 years ago
    Ok so I do something similar to this but I have a pretty length set of procedures to find items by text so I'll keep it as simple as I can.



    Sys.Process("ApplicationNmae").FindChild(new Array("ClrClassName", "WPFControlText"), new Array("MenuItem", "*"))



    Return all objects into an array and check the MenuItem property of each item individually stripping the _ and any other invalid characters from the value.



    Not sure what language you are using but I can provide an example if you'd like.