Community
Showing results for 
Search instead for 
Do you mean 
Reply

URN for Contacts menu?

Accepted Solution Solved
Copper Elite Contributor
Posts: 81
Country: Canada
Accepted Solution

URN for Contacts menu?

[ Edited ]

Hi everyone,

 

I have mostly been sticking to the tools and schedule menu for my addons so far but a tool I am working on at the moments needs to be put inside the Contacts menu in Act!

 

I have tried using "act-ui://com.act/application/menu/contacts/myaddonname". However, this doesn't work. Does anyone have a list of URNs for the menu items inside Act? I would really appreciate any help.

 

Thanks

 

Ahsan

Ahsan Khalid

Chief Technology Officer
Keystroke Quality Computing Inc.
www.keystroke.ca


Accepted Solutions
Solution
Accepted by topic author Ahsan
‎09-25-2015 03:20 AM
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: URN for Contacts menu?

[ Edited ]

Here is some code which will create a text file of all the ACT menu URNS.

 

            Dim FS As New IO.FileStream("C:\ACTMenus.txt", IO.FileMode.Append, IO.FileAccess.Write)
            Dim sw As New IO.StreamWriter(FS)
            For Each pMenu As Act.UI.Core.CommandBarControl In ACTAPP.Explorer.CommandBarCollection("Connected Menus").ControlCollection
                Dim Parentname As String = pMenu.Text.Replace("&", "").ToUpper

                For Each SubMenu As Act.UI.Core.CommandBarControl In pMenu.SubItems
                   sw.WriteLine("Public Const " + Parentname + "_" + SubMenu.Command.Substring(SubMenu.Command.LastIndexOf("/") + 1) + " As String = QUOTES " + SubMenu.Command + " QUOTES")

                    Dim SubSubName As String = SubMenu.Command.Substring(SubMenu.Command.LastIndexOf("/") + 1)
                    For Each Sub2Menu As Act.UI.Core.CommandBarControl In SubMenu.SubItems
                        sw.WriteLine("Public Const " + Parentname + "_" + SubSubName + "_" + Sub2Menu.Command.Substring(Sub2Menu.Command.LastIndexOf("/") + 1) + " As String = QUOTES" + Sub2Menu.Command + "QUOTES")
                    Next

                Next
            Next
            sw.Close()

 

Hope this helps

-- Jim Durkin

View solution in original post


All Replies
Solution
Accepted by topic author Ahsan
‎09-25-2015 03:20 AM
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: URN for Contacts menu?

[ Edited ]

Here is some code which will create a text file of all the ACT menu URNS.

 

            Dim FS As New IO.FileStream("C:\ACTMenus.txt", IO.FileMode.Append, IO.FileAccess.Write)
            Dim sw As New IO.StreamWriter(FS)
            For Each pMenu As Act.UI.Core.CommandBarControl In ACTAPP.Explorer.CommandBarCollection("Connected Menus").ControlCollection
                Dim Parentname As String = pMenu.Text.Replace("&", "").ToUpper

                For Each SubMenu As Act.UI.Core.CommandBarControl In pMenu.SubItems
                   sw.WriteLine("Public Const " + Parentname + "_" + SubMenu.Command.Substring(SubMenu.Command.LastIndexOf("/") + 1) + " As String = QUOTES " + SubMenu.Command + " QUOTES")

                    Dim SubSubName As String = SubMenu.Command.Substring(SubMenu.Command.LastIndexOf("/") + 1)
                    For Each Sub2Menu As Act.UI.Core.CommandBarControl In SubMenu.SubItems
                        sw.WriteLine("Public Const " + Parentname + "_" + SubSubName + "_" + Sub2Menu.Command.Substring(Sub2Menu.Command.LastIndexOf("/") + 1) + " As String = QUOTES" + Sub2Menu.Command + "QUOTES")
                    Next

                Next
            Next
            sw.Close()

 

Hope this helps

-- Jim Durkin

Copper Elite Contributor
Posts: 81
Country: Canada

Re: URN for Contacts menu?

Thanks a lot Jim! This works great. 

 

Ahsan Khalid

Chief Technology Officer
Keystroke Quality Computing Inc.
www.keystroke.ca