What happens is the following. The raid manager has a secure button with a macrotext attribute set to "/pull 3".
The pull timer addon registers the slash command "pull" and reacts on the time given.
It triggers the Pull() function that calls itself recursively as long as there are seconds left. And either /y yells the pull timer or uses /rw in raids. I am able to adjust the pull timer macro text on the fly to print: "Pull in 3", "Pull in 2", "Pull in 1", "Pull now!!!".
I am even able to access WoW API functions like IsInRaid().
That got my thinking. What would prevent me from accessing functions like UnitPower("player") or spell cooldown functions?
If the above holds up shouldn't it be possible to create an addon that registers a slash command like /easywarrior which checks for specific conditions and alternates the macro text to cast specific spells under certain conditions?
All that would be needed is to put an action button on your bar using a macro which is calling /easywarrior.
Did I just get lucky that I (A) either did not test the addon well in combat or (B) the functions I am using right now are part of the secure environment or (C) I have found a hole in the system.
local MacroEditBox = MacroEditBox
local MacroEditBox_OnEvent = MacroEditBox:GetScript("OnEvent")