#include <Misc.au3>
HotKeySet("{ESC}", "Terminate")
Local $dll = DllOpen("user32.dll")
Local $i = 0
While 1
If _IsPressed("01",$dll) Then ; Left MouseClick
Do
$i=$i+1
Send("1")
Sleep(250)
Until $i=10
ElseIf _IsPressed("0D",$dll) Then ; {Enter}
Do
$i=$i+1
Send("2")
Sleep(250)
Until $i=10
EndIf
WEnd
DllClose($dll)
Func Terminate()
Exit
EndFunc