Uses an arbitrary item (optionally on a specified unit)

See also Item functions.


UseItemByName(itemID [, "target"]) or UseItemByName("itemName" [, "target"]) or UseItemByName("itemLink" [, "target"])


  • itemID - An item's ID (number)
  • itemName - An item's name (string)
  • itemLink - An item's hyperlink, or any string containing the itemString portion of an item link (string)
  • target - A unit on which to use the item, if applicable (string, unitID)
This function is protected and can only be called by the Blizzard user interface