I remember toying around with this a while back and the only way that I was able to get it to work was to force it to wait and then loot the item. This is what I use to loot BoP items while solo.
Code:
local g = CreateFrame("Frame")
g:RegisterEvent("LOOT_BIND_CONFIRM")
g:SetScript("OnEvent", function(self, event, id)
if GetNumRaidMembers() == 0 and GetNumPartyMembers() == 0 then
local elapsed = 0
self:SetScript("OnUpdate", function(self, elap)
elapsed = elapsed + elap
if elapsed < 0.2 then
StaticPopup_Hide("LOOT_BIND")
return
end
elapsed = 0
ConfirmLootSlot(id)
end)
end
end)
I don't know if this is the most efficient method, but it does work.