I'm trying to write a macro that will remove the cruft from certain URLs when they're copied to the clipboard. I created a new macro that runs on clipboard change, and I basically have it working, except ... the last step would be to place the decrufted URL back on the clipboard.
And, of course, as soon as I do that, the macro runs again because the clipboard changed. Enter infinite loop.
I've tried a semaphore lock/unlock, which didn't work. I've tried setting a variable to 1 just before I paste to the clipboard, and modifying the macro so it won't run if that variable is 1 (and i then set it to 0 at the end of the macro). That didn't work.
I could decruft on paste, but I'd really prefer to store the simplified URL on the clipboard. Is there some way to say "don't run if triggered by a macro?" Or some other simple solution I'm overlooking?
thanks;
-rob.