Saw this in a reddit thread:

Simply go to system configuration -> controller settings -> button configuration -> change right joystick click to "execute macro #98 or 99" . Then set your macro (for sprint type.. /ac "sprint") .