Simple macro to help leveling enchanting. With this you just select the enchant you want to use in the UI and hover over the item to enchant.
/cast enchanting
/cast enchanting
/script DoTradeSkill(GetTradeSkillSelectionIndex());
/run GetMouseFocus():Click()
/script ReplaceEnchant()
/click StaticPopup1Button1
Source: https://eu.forums.blizzard.com/en/wow/t/enchanting-leveling-macro/1005