Howdy folks,
I like to keep my Engine log file as clean as possible, but as many of you may know, cancelling or escaping out of a Prompt With List action results in a failed action entry. For me, these entries are irrelevant, and can clutter my log when I’m looking through it for other failed actions that I consider to truly be failures. Therefore, I wrote a macro that can be run as a subroutine that, when placed after a Prompt With List action (with Cancel macro upon failure unchecked), will remove the action failed line if you escape or cancel out of the prompt. I have been using it quite extensively since January without any issues, so I figured I would share it here in case anybody else has a similar desire.
More details and screenshots are below. As usual, feel free to share any comments or suggestions, or to let me know if it doesn’t work for you.
-Chris
Download Macro(s): 54)[MG-SUBRT] Remove prompt with list last action failure from KM Log.kmmacros (9.8 KB)
Macro Notes (Click to expand/collapse)
- Macros are always disabled when imported into the Keyboard Maestro Editor.
- The user must ensure the macro is enabled.
- The user must also ensure the macro's parent macro-group is enabled.
System Information (Click to expand/collapse)
- macOS 13.6.6
- Keyboard Maestro v11.0.2
CURRENT VERSION: 1.0.0 (Monday, January 29, 2024)
Version History
v1.0.0 Monday, January 29, 2024
Initial macro
RELEASE NOTES, INSTRUCTIONS AND DISCLAIMER
Purpose of this macro (click to expand/collapse)
Remove failed action from KM Engine Log
How this macro works (click to expand/collapse)
The shell script searches the Engine log for the most recent failed action line that corresponds to a cancelled Prompt With List action (based on a timestamp set upon macro execution) then removes that line from the log.
How to use this macro (click to expand/collapse)
Place it as a execute macro or execute subroutine action after your Prompt With List action, and disable the Cancel macro upon failure option in that Prompt action.
How to configure this macro (click to expand/collapse)
No configuration necessary beyond configuring the Prompt With List action settings wherever you want to use this.
Disclaimer (click to expand/collapse)
TL;DR: I built it and it works for me. You can share/modify it how you want. But don't blame me if it doesn’t work for you ![]()
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


