Page 1 of 1

Make macro beep on error and continue

Posted: 2019 Jun 13, 22:33
by pschroeter
I figured out ERRORSTOP 0 makes a macro not hang up on an error. Is there a way to make a macro exit AND beep to let me know the error has happened?

I have the following macro that just swaps the panes in two pane view.

ERRORSTOP 0
command 32869 This replaces a Menuhack command I no longer need, thank you.

Since my open Dual button and Swap Pane buttons look similar, it kind of lets me know I pushed the wrong button if I meant to push the Dual button.

It might be nice if I could write something like
ERRORSTOP 0 BEEP
With BEEP being an optional argument.

Re: Make macro beep on error and continue

Posted: 2019 Jun 14, 05:50
by nikos
when you turn off errors, you are supposed to check for errors yourself after each command that is uncertain. E.g after COMMAND you can put

Code: Select all

ERRORSTOP 0
 command xxx
JUMPOK no_error
message error!
LABEL no_error
so in case of error you would see an error message