Quote Originally Posted by lacitpo View Post
I believe macro text is locked during combat to prevent 'intelligent' addons. I don't think modification on the fly is possible with the current API.
Indeed the macro text is locked during combat. This is not a problem however. You'd want to collect data from more then one fight before altering the macro anyway. You can just trigger the write when leaving combat.