WoW API: UseInventoryItem

From AddOn Studio
Revision as of 04:47, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API UseInventoryItem to API UseInventoryItem without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < UseInventoryItem

Use an item in a specific inventory slot.

Syntax

UseInventoryItem( slotID );

Arguments

slotID
The inventory slot ID
You can get the slot ID by using GetInventorySlotInfo(slot)

Return Value

Always nil.

Example

/script UseInventoryItem( GetInventorySlotInfo("Trinket0Slot") );

After patch 1.6 you cant auto-use items anymore. Addons can no longer activate items without the press of a button. In order to use UseInventoryItem( GetInventorySlotInfo("Trinket0Slot") ) you will have to call it from a button, keypress or icon as you do with spells.