I saw something like what you're talking about, but I can't remember where it was. In general, you can typically trim out some of the drop-down selection instructions. Here's an example:
BEFORE:
mapkey mm @MAPKEY_LABELmeasure;\
mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `Analysis`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\
mapkey(continued) ~ Activate `main_dlg_cur` `Analysis.psh_analysis_measure`;\
mapkey(continued) ~ Open `measure` `MsrTypeOptions`;~ Close `measure` `MsrTypeOptions`;\
mapkey(continued) ~ Select `measure` `MsrTypeOptions`1 `Distance`;
AFTER:
mapkey mm @MAPKEY_LABELmeasure;\
mapkey(continued) ~ Activate `main_dlg_cur` `Analysis.psh_analysis_measure`;\
mapkey(continued) ~ Open `measure` `MsrTypeOptions`;~ Close `measure` `MsrTypeOptions`;\
mapkey(continued) ~ Select `measure` `MsrTypeOptions`1 `Distance`;
These two lines are basically recording the fact you clicked the 'Analysis' dropdown, but the real command is the 'Analysis.psh_analysis_measure'.
mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `Analysis`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\
<tg>