I'm not sure. Maybe the middle button is not registered.
I don't have a 3 button mouse available atm and can't test it.
Try to register for MiddleButtonDown:
Lua Code:
for container = 1, 5 do
for item = 1, 36 do
_G["ContainerFrame"..container.."Item"..item]:RegisterForClicks("MiddleButtonDown")
_G["ContainerFrame"..container.."Item"..item]:HookScript("OnClick", function(self, button)
print(button)
if IsShiftKeyDown() and button == "MiddleButton" then
print(GetItemInfo(GetContainerItemID(self:GetParent():GetID(), self:GetID())))
end
end)
end
end
See
http://www.wowwiki.com/API_Button_RegisterForClicks for reference.