View Single Post
02-20-14, 01:52 PM   #5
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
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:
  1. for container = 1, 5 do
  2.         for item = 1, 36 do
  3.             _G["ContainerFrame"..container.."Item"..item]:RegisterForClicks("MiddleButtonDown")
  4.             _G["ContainerFrame"..container.."Item"..item]:HookScript("OnClick", function(self, button)
  5.                 print(button)
  6.                 if IsShiftKeyDown() and button == "MiddleButton" then
  7.                     print(GetItemInfo(GetContainerItemID(self:GetParent():GetID(), self:GetID())))
  8.                 end
  9.             end)
  10.         end
  11.     end

See http://www.wowwiki.com/API_Button_RegisterForClicks for reference.
  Reply With Quote