I think what you are looking for is the following event:
Event.Tooltip
this will trigger every time the tooltip is changed.
Once fired, you will need to use
Inspect.Tooltip
This will get the entire tooltip object. In this object there is a type property that will hold "item" or "itemtype" for you to key off of... others tooltip types are "unit", "buff", and "ability"
Then use the code posted to pass the item...
Example:
Code:
function scrapeTooltip()
local ttType = ""
local ttItem = nil
ttType, ttItem = Inspect.Tooltip()
if ttType == "item" then
TTGetItem(ttItem)
elseif ttType then
print(string.format("Type: %s", ttType))
end
end
function TTGetItem(itm)
local itemDetail = Inspect.Item.Detail(itm)
local itemStrength = itemDetail and itemDetail.stats and itemDetail.stats.strength or 0
if itemStrength then print(string.format("Strength: %s", itemStrength)) end
end
table.insert(Event.Tooltip, {scrapeTooltip, "Tester", "Tester_Init"})