I wanted to call SuperMacro's macros using the {macro} syntax.
This seems to work; basically it tries to call the system macro, and if that fails, it looks for a SuperMacro macro.
15,34d14
< function Roids.ExecuteMacroBody(body)
< local lines = Roids.splitString(body, "\n");
< for k,v in pairs(lines) do
< ChatFrameEditBox:SetText(v);
< ChatEdit_SendText(ChatFrameEditBox);
< end
< end
<
< -- Attempts to execute a SuperMacro by the given name
< -- name: The name of the macro
< -- returns: Whether the macro was executed or not
< function Roids.ExecuteSuperMacroByName(name)
< local body = GetSuperMacroInfo(name, "body");
< if not body then
< return false;
< end
<
< Roids.ExecuteMacroBody(body);
< end
<
41c21
< return Roids.ExecuteSuperMacroByName(name);
---
> return false;
46c26
< return Roids.ExecuteSuperMacroByName(name);
---
> return false;
49c29,33
< Roids.ExecuteMacroBody(body);
---
> local lines = Roids.splitString(body, "\n");
> for k,v in pairs(lines) do
> ChatFrameEditBox:SetText(v);
> ChatEdit_SendText(ChatFrameEditBox);
> end
550c534
< end
---
> end
I wanted to call SuperMacro's macros using the {macro} syntax. This seems to work; basically it tries to call the system macro, and if that fails, it looks for a SuperMacro macro.