Earlier I posted a script but it won’t work unless you start a new line between “ClearAllPoints()” and “PetActionButton1”. I have fixed it and the script is as follows:
That is copied directly from my macro and works perfectly on my end.
If it still doesn’t work, I believe Ghorak has the right idea; see his post below: