; Toggle variable
toggle := 0
; Hotkey to turn the script ON
F1::
toggle := 1
TrayTip, Right-Click to W, Script ON
Return
; Hotkey to turn the script OFF
F2::
toggle := 0
TrayTip, Right-Click to W, Script OFF
Return
; Right-click to send W if the script is ON
RButton::
If (toggle = 1) {
Sleep, 500 ; Wait for half a second (500 milliseconds)
Send, {w down}
Sleep, 10 ; Briefly hold the W key down (adjust this value as needed)
Send, {w up}
}
Return