I was modifying "FileMenu for all filetypes.mnw" and in the initialization code I inserted apause(`DEBUG PAUSE`, strCat(`fDir = `, fDir)) ;***DEBUG LINE*** line for testing. Regardless of which button I click the menu code executes anyway, which is not the expected behavior for the Pause message.
I then inserted the same line at the start of the menu item which I had selected in Explorer and it processed as expected, cancelling or continuing, depending on which button was clicked or cancelling if the Escape key was pressed.
Menu files do not work that way. They are not processed linearly like script files are processed by WinBatch. When you press Cancel from a prompt in the initialization (autoexec) section, it short circuits the rest of the initialization section but it does not short circuit the menu section. This is because the two sections are processed in separate steps.