What I did so I can use my Logitech G15 Keyboard to mass do this is make a generic macro I call Last Objet+Last Target.
Enhanced Client.
1) Legacy Targeting is OFF (unchecked)
2) Macro is
2A) Last Object - Target -> Cursor
2B) Wait for Target
2C) Cursor Target Last
3) Assign Hotkey to Macro
If you do not have something equivalent to the Logitech G15, then you can set this macro to repeat N number of times. A Max of 10 repeats.
The Macro works for Mining, Lumber Jacking, Wool/Thread etc to Spinning Wheel, etc.