Forum Discussion

m_essaid's avatar
m_essaid
Valued Contributor
11 years ago

Accessing menu item

Hi,



I need to access the third item of the fourth menu of an application.

It's WinMerge, menu Tools, submenu Report.



I read a lot of documentation but didn't succeed.



Any help would be much appreciated.



Regards,



Mehdi
  • I know there's a "right" way to do it by actually traversing the menu system, but like you I haven't been able to get that working in Windows apps. I ended up copping out and just using keyboard shortcuts. It looks like the one you want can be hit with ALT+T+R



    So something like:

        objWinMerge.keys("~TR")



  • NisHera's avatar
    NisHera
    Valued Contributor
    Hi ,

    I don't know how your application behaves.

    but I use to expand tree views using 



    treeView.ExpandItem("|Desktop|HR|Expence Report |Add New")

    treeView.DblClickItem(""|Desktop|HR|Expence Report |Add New"")





  • I know there's a "right" way to do it by actually traversing the menu system, but like you I haven't been able to get that working in Windows apps. I ended up copping out and just using keyboard shortcuts. It looks like the one you want can be hit with ALT+T+R



    So something like:

        objWinMerge.keys("~TR")



  • m_essaid's avatar
    m_essaid
    Valued Contributor
    Joe : Unfortunatly I don't have a shortcut for this menu item, it's the 2nd element of the 4th menu.



    @nishnatha herath : The autocompletion doesn't know this syntax.

  • m_essaid's avatar
    m_essaid
    Valued Contributor
    Joe : finaly I understood what you where saying, it works great. thank you very much.