Code:
local eventframe=CreateFrame("FRAME")
eventframe:SetScript("OnEvent",
function(self,event,...)
return self[event] and self[event](...)
end)
eventframe:RegisterEvent("AUCTION_HOUSE_SHOW")
function eventframe.AUCTION_HOUSE_SHOW()
ToggleCharacter("PaperDollFrame")
end
You can use the code at Vladinator's
World of Warcraft: Addon Creator to make a simple addon out of it.
Unless I totally misunderstood the request