Returns information about the item used by a macro. If a macro contains conditional, random, or sequence commands, this function returns the item which would currently be used if the macro were run.


See also Macro functions, Hyperlink functions, Item functions.

Signature:

name, link = GetMacroItem(index) or GetMacroItem("name")

Arguments:

  • index - Index of a macro (number, macroID)
  • name - Name of a macro (string)

Returns:

  • name - Name of the item (string)
  • link - A hyperlink for the item (string, hyperlink)

Examples:

CreateMacro("health",1,"/use [combat] Runic Healing Potion ; [nocombat] Salted Venison")

-- when in combat:
GetMacroItem("health")
-- returns "Runic Healing Potion" (and hyperlink)

-- when not in combat:
GetMacroItem("health")
-- returns "Salted Venison" (and hyperlink)