You need to tell your imbues to cast at "no target". This brings up the blue-outline hand target selection cursor. When you /use an inventory slot with this cursor active, it behaves as if you clicked on the slot.
Code:
#showtooltip
/castsequence [(at)none] reset=5 Main Hand Imbue, Off Hand Imbue
/castsequence reset=5 16, 17
Replace (at) with the at symbol (the server won't let me post with the actual symbol as it thinks it's a link). You may or may not need to place /click StaticPopup1Button1 on the line below the two castsequences.