Code: Select all
CoordMode Mouse
!a::
if on := !on {
MouseGetPos x3, y3
BlockInput, On ; Block input to prevent manual mouse movement
Send +{F3}
Send {F2}
MouseMove x1, y1, 0
} else {
MouseGetPos x4, y4
Send +{F3}
Send {F4}
MouseMove x2, y2, 0
Send {Esc}
Sleep 25
Send {LButton}
Send {F3}
MouseMove x4, y4, 0
Send f
BlockInput, Off ; Enable input after the process is complete
Return
}
Send {Esc}
Sleep 25
Send {LButton}
Send {F3}
MouseMove x3, y3, 0
Send f
BlockInput, Off ; Enable input after the process is complete
Return
+F2::
MouseGetPos x1, y1
Return
+F4::
MouseGetPos x2, y2
Return