If copied item is same as previous time, cancel macro?

If cmd+c is pressed and nothing is copied to the clipboard (in my case, when the end of a list is reached) I want the macro to cancel.

Here is the pseudocode I have: If the item in the clipboard now is the same as the previous time the loop was run, cancel the macro, else continue.

This was my failed attempt:

See this macro for a good example:

MACRO: [CB] How to Detect When Clipboard Has Changed [Example]

1 Like