Go to Recent Failed Macro Action v2 [Macro:KM10]

*[NOTE: This is enhanced version of the original one at [Go to Recent Failed Macro Action [Macro:KM10]]. This is bit complicated, so if your need is simple, the original version will suffice, but if you want a bit more convenience, this version is better. The reason why I wanted to build a second version is because I find it useful to have two line error messages and the ability to open the KM Log and show Last recent Failed Macro action information]

Remember those times where macro failed and aborted leaving you scratching your head of what went wrong? So you open up the KM log file and check for the recent failed action. This manual checking is quite tedious especially if macro has many actions and you need to figure out which action is actually causing the error. So you probably end up calling logging, debugging or display action to trace the failed action.

But no more, KM10 has added this valuable feature "Select Last Aborted Action"
View -> Select Last Aborted Action
to immediately highlight the specific action in the macro that failed.

The following is the macro that upon triggering will open up the KM Editor and call "Select Last Aborted Action" to highlight the failed action while displaying the failed action description so to quickly pinpoint the source of error. (Note that this macro should be used immediately after the error occur because KM Log file and "Aborted Action" may have changed if the macro is used later. )


  • Display two lines: The first line is the failed action line, and the second line may shown the error description (otherwise just ignore the second line)
  • Shortcut-Key trigger at Top Screen Edge will open KM Engine Log file Console app.
  • Shortcut-Key trigger at Right Screen Edge will show the recent failed macro action in dialog box.

Note: If you need the error message text to be larger in Display Large Text Action, put a lower value for MAX_WIDTH in the JXA Action

[KAP] Go to Recent Failed Macro Action.kmmacros (15.7 KB)