Pause() not cancelling

Started by George Vagenas, July 10, 2014, 06:09:50 PM

Previous topic - Next topic

George Vagenas

I was modifying "FileMenu for all filetypes.mnw" and in the initialization code I inserted a
Code (winbatch) Select
pause(`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.
Thanks

George

td

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.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade