API Support for IsActionRange or CheckInteractDistance (Macro examples?)

If a character is too far from a target some skills won’t work. I understand that major changes were made to what scripts could do from patch 2.0.1 onwards to tie macros to hardware events. Even so, API functions such as the following were designed to ensure that key presses could be performed because the target was in range:

inRange = CheckInteractDistance("unit", distIndex);

and:

inRange = IsActionInRange(actionSlot);    

I understand scripts cannot use range as a conditional (meaning if target range = 10 yards cast spell).

Does anyone know if the API still supports the above functions? If I cannot click an ability because the target is out of range I should be able to prevent an attempt to use an ability in a macro for the same reason (target is out of range). Does anyone have any examples of how these functions might be used in a macro?

They can’t. Mods and Macros are not allowed to use these in combat.