I found that in my attempt at this, the script modifying the clipboard would trigger the script over and over. So I added an additional condition to stop it:
Like so: