This macro was created for the Fantime server. To activate it, place, for example, the ender pearl in the 7th slot of the hotbar and press the X key. The macro will automatically move the pearl to the 7th slot, use it, and then return it back to the 2nd slot.