They've explicitly decided against implementing this sort of functionality.

Quote Originally Posted by Hiroshi_Minagawa View Post
Here is the macro feature policy for FFXIV:
  1. Do not make it so macros must be used.
  2. Minimizing and optimizing actions without error beyond that of human control is not allowed.
  3. Make it a support feature that can be used by people that are a bit shaky at controlling the game to ensure control, while not making it 100% optimized.
  4. The player makes the execution decision. We will not be implementing a feature where the macros makes its own decisions. For example: We will not be implementing a feature that executes things based on certain criteria (player status, enemy HP, certain actions, etc.)
Point four being the most relevant here.