As others have stated before:
Addons can not edit macros
when you are in combat. Its simply not possible.
However, i wrote an addon that among other things will let you edit dynamically edit a macro when you are
out of combat based on conditions you specify.
Its called
IfThen and it is -technical- (if you have done any programming before you'll be fine).
Link:
http://www.wowinterface.com/download...11-IfThen.html