Playing with a thought here, but I'm not sure which word to use by the "elseif" (line 11), the hotkey hiding works, but the macro part doesn't.
LUA Code:
local macrohide = 1
local hotkeyhide = 1
local actionButtonHotkey = {}
-- Just creating a blank table for just ActionButtonHotKeys
if (hotkeyhide == 1) then
for i=1,12 do
actionButtonHotkey[i] = _G[format("ActionButton%dHotKey",i)];
end
elseif (macrohide == 1) then
for i=1,12 do
actionButtonHotkey[i] = _G[format("ActionButton%dName",i)];
end
end
-- Iterate over 1 through 12 and store all of these frames into the blank table we created earlier
for k,v in pairs(actionButtonHotkey) do
v:SetAlpha(0);
end
Bonus question off-topic: Which program do you use for writing such code?