I spewed ignorance in my previous post. Its late in the day I guess. That should work, but I don't use it, so I was not as familiar with it. Maybe you have a slow caster that is taking more than 3S to cast recall and is missing the window. That would cause a failure.
You might use the #targcurs value under "Extended Info" in the EUO window as an alternative, but its not as pretty as your code. This would still fail if your toon takes longer than 3s to cast
Set #TargCurs 0
Set #CastTimeout #Scnt + 3
Event macro 15 31
Repeat
Wait 1
Until #TargCurs = 1 || #CastTimeout <= #Scnt
If we knew what the absolute longest you can take to cast recall is you might use that instead of 3
Presumably the target command is based on the #targcurs value and it should be just as reliable.