Might be a possible with a macro such as this:
lua Code:
/run local f=CreateFrame"Frame"f:SetScript("OnEvent",function(s,e,i,r)ConfirmLootRoll(i,r)s:UnregisterEvent(e)s:SetScript("OnEvent",nil)end)f:RegisterEvent"CONFIRM_LOOT_ROLL"RollOnLoot(1,2)
This could have unintended side-effects though since the script confirms the first CONFIRM_LOOT_ROLL event, which *should* be the RollOnLoot executed right after frame creation, but it *might* not be.
Then I'm not sure about performance of creating a new frame every time the macro is called.