In KM 8+, you can use the Assert Action for this type of problem.
The Assert action is a simple new action in Keyboard Maestro 8. It is basically just "if not condition then fail", but this can be a very useful tool for ensuring that your macro has received the right data.
For example, if your macro is expecting you to have copied a URL:
[image]
This ensures the macro stops immediately if it is given the incorrect data.
Asserts are a very powerful tool for ensuring correctness, helping you quickly track down and resolve a problem when the macro has gotte…
(I know this is an old topic, but I ran across this problem yesterday and used Dan's solution, then found Peter's post on the Assert action today and it's another great solution.)
1 Like