I have a macro that, if triggered, should cancel a previously running instance of itself. The following group, placed at the top of the macro, accomplishes that requirement.
Interestingly, without the check of local_Instance (is not empty), the macro cancels itself. I expected the Cancel a Specific Macro action to do nothing if the Instance is null.
But there s something else I want to know… What happens if the Action‘s Textfield contains any possible Variable-Token (Local-,Instance- or Global Variable) instead of being an empty String or containing “THIS” and the Value from the evaluation out of the Variable-Token from this Textfield is either an empty String or “THIS” ?!
Does this action then also Cancel the Macro Instance, or do we need our own follow-up routine to Cancel the Macro with the “Cancel Just This Macro” Option ?!
@Nige_S, it would be helpful to replace the above with what you subsequently stated…
Strictly, this might be even better to state…
The empty string or "THIS" (or a variable or token that resolves to “THIS”) cancels the macro (and any caller, if appropriate, following the usual "inherited Instance UUID" rules)
To me, the empty string behavior is non-intuitive, thus the wiki update by @peternlewis is imporrtant and appreciated.
It certainly has no effect, but it does something -- my guess is that it sends a "cancel thisUUID" call to the Engine, i.e. there's no "if this UUID is valid" at the action level.
I'm saying "silently fails" because there's no error in the log and the %ActionResult% is "OK" -- which might be important to those who like to do error-checking.
All guess-work, of course -- I'd never even thought about this until your post!