WoW:API GetInboxItem
Jump to navigation
Jump to search
GetInboxItem(index)
Where index is the index of the message you want to get the attached item information about. Index starts at 1, unlike an array subscript.
Returns a text description of the item.
Example Lua Script:
inbox_items = GetInboxNumItems();
if (inbox_items > 0) then
for inbox_item_index = 1, inbox_items do
-- Get the Message Text
inbox_text = GetInboxText(inbox_item_index);
-- Get the Attachment Description Text
inbox_item = GetInboxItem(inbox_item_index);
if (inbox_text ~= nil) then
DEFAULT_CHAT_FRAME:AddMessage("Inbox Text: "..GetInboxText(inbox_item_index), 1, 1, 1); -- Print the message text
end
if (inbox_item ~= nil) then
DEFAULT_CHAT_FRAME:AddMessage("Inbox Item: "..GetInboxItem(inbox_item_index), 1, 1, 1); -- Print the attachment description
end
end
end
</code>