#include <Misc.au3>
Local $hDLL = DllOpen("user32.dll")
While 1
If _IsPressed("11", $hDLL) Then
MouseDown("right")
While _IsPressed("11", $hDLL)
Sleep(250)
WEnd
MouseUp("right")
ElseIf _IsPressed("1B", $hDLL) Then
ExitLoop
EndIf
Sleep(250)
WEnd
DllClose($hDLL)