This macro was working fine a month ago, but suddenly started having issues with finding a menu item:
When I looked at the action in question, I could no longer get to the 'Export' submenu through the Menu dropdown... I can access some of the other submenus (of Track, Clip, etc.) but not submenus of 'File'. Manually entering the submenu and menu item does not work. (aborts macro with "Failed to find target menu item.")
Attempting to attach a screenshot (if allowed) that shows the menu tree stopping cold at the 'File' menu, and not showing any further sub menus. Shown below is the previously-working action.
Well, the Menu dropdown in KM was fixed on a reboot and rebuild of the action, but the macro still aborted on trying to find the menu item again, even though it was built using the Menu dropdown to select File>Export>MIDI...
Pro Tools lets you assign hot keys to all menu functions, so I assigned one to the Export MIDI menu item, and used the Type Keystroke action to trigger it, and that works. Hopefully this might help someone else!
I have one more thought. Some applications may not "populate" some of their menu items until the moment the user clicks on them. If that's true here, then it may be possible to get KM to force a refresh by having KM "manually" click on the menus.
Of course, this is only another idea with a 10% chance of success. If your macro fails in the future, consider this idea.
I hope this bumps this question, I'm having the same issue, the menu options for some sub menus disappeared. I can't tell for sure when this happened since I had to quickly change the shortcuts in pro tools itself as to not waste any time but now that I'm trying to cleanup and reorganize my shortcuts I am stumped.
I've tried both solutions @Airy provided but still no luck