Forum Discussion

solomon_arul's avatar
Occasional Contributor
12 years ago

how to handle objects with same name??

Our application has three contextmenu of the same name and only one of the menu is mapped so while running a script the active context menu is not called instead the mapped contextmenu is called

3 Replies

  • sastowe's avatar
    Super Contributor
    Take a look at the help topics on the various FIND methods. You can find your object based on known property values, iterate through an array of objects... Not sure the best solution for you.
  • tristaanogre's avatar
    Esteemed Contributor
    As Stephanie pointed out, use the Find methods to be able to find an object based upon more properties than just the name and assign it to a variable in your scripts.

    The other option is to utilize NameMapping which will essentialy do the same thing... you can apply an Alias to an object that is mapped based upon a set of properties that make that object unique.  So, while the object may have the same name, other things like caption, child objects it contains, etc., would give the object a different identifier in your name mapping.