You could hook the OnClick event of the frames.
Lua Code:
for container = 1, 5 do
for item = 1, 36 do
_G["ContainerFrame"..container.."Item"..item]:HookScript("OnClick", function(self, button)
if IsShiftKeyDown() and button == "MiddleButton" then
print(GetItemInfo(GetContainerItemID(self:GetParent():GetID(), self:GetID())))
end
end)
end
end
Another way doing it would be to hook Blizzards
ContainerFrameItemButton_OnModifiedClick(self, button).
Like
Lua Code:
hooksecurefunc("ContainerFrameItemButton_OnModifiedClick", function(self, button)
if IsShiftKeyDown() and button == "MiddleButton" and self:GetParent():GetID() <= 5 then
print(GetItemInfo(GetContainerItemID(self:GetParent():GetID(), self:GetID())))
end
end)
I bet Phanx likes this one more because it's using only one hook and not 5x36. ;D