WoW API < GetMacroSpell

Returns the spell a given macro is set to cast. This function can be used by action bar addons to display dynamic macro icons and tooltips. As a macro's cast sequence changes, this function can be queried to get the next spell that will be cast.

name, rank = GetMacroSpell(slot)

Arguments: Edit

number - The macro slot to query

Returns: Edit

The name of the spell the macro is set to cast (string)

The rank of the spell, if applicable (string)

Example: Edit

       local index = GetMacroIndexByName(spell);
       if (index) then 
             local spellname, rank = GetMacroSpell(index);
             spell = spellname;
Community content is available under CC-BY-SA unless otherwise noted.