Not with the standard macro language sadly, maybe using /script but I'm not 100% sure.
Anything that opens a loot window has to be done manually I think to make botting harder.
You can switch to the gloves easily enough using /equipslot (slotnum) (item)
____________________________"WHEN PASSENGER OF FOOT HEAVE IN SIGHT, TOOTLE THE HORN. TRUMPET HIM MELODIOUSLY AT FIRST, BUT IF HE STILL OBSTACLES YOUR PASSAGE THEN TOOTLE HIM WITH VIGOUR."