Blizzard won't ban you for using in-game LUA commands to do things they don't want you to do with the API. Well, unless you're using a macro/mod to do something that's actionable anyways, like chat flooding or whatever.
If you code some macro or mod they don't approve of, then they just change the API so you can no longer do what you were doing.

And, I don't think this macro works anyhow, and hasn't been working in a long long time actually, since it's trying to call protected functions. I could be wrong on this but try it in-game and see.