Here's my script. It maps F1 to left mouse button and F2 to right mouse button. Hold the key to drag stuff. Press it to click. Great for people like me who got a comfortable logitech mouse with a broken key and are too cheap to buy a new replacement.
; Recommended for performance #NoEnv ; Better and more reliable SendMode Input ; Press the right mouse button unless it's already pressed. F2:: if ( not GetKeyState("RButton" , "P") ) Click down right return ; Release the mouse button when the key is released. F2 Up::Click up right F1:: if ( not GetKeyState("LButton" , "P") ) Click down return F1 Up::Click up