Here is my shot at it with my stop and start timer that I wrote for alot of my stuff.
To use F1 to start you will hear 1 ding. Then F1 again to stop you will hear 2 Dings.
Code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetKeyDelay 10,50
AutoMouseClick = off
F1::
If AutoMouseClick = off
{
AutoMouseClick = on
SetTimer, AutoMouseClick, 100
Ticks := 0
SoundPlay, %A_WinDir%\Media\Windows Ding.wav
} else If AutoMouseClick = on
{
AutoMouseClick = off
SetTimer, AutoMouseClick, Off
SoundPlay, %A_WinDir%\Media\Windows Ding.wav
sleep 100
SoundPlay, %A_WinDir%\Media\Windows Ding.wav
}
return
AutoMouseClick:
MouseClick, right
return