Which part would need to be able to be set by a variable?
There aren't that many mouse controls, compared to keyboard keys, so you could use conditions for this.
E.G.
Begin Text Compare : [mouseButton] Equals 'right'
Click right mouse button
Else If Text Compare : [mouseButton] Equals 'middle'
Click middle mouse button
Else
Click left mouse button
End Condition