help with mouse move script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
reece0306
Posts: 12
Joined: 11 Aug 2021, 23:45

help with mouse move script

Post by reece0306 » 13 Aug 2022, 11:37

I would like a script where if shift+\ is pressed, then it will capture the current mouse position. Then, go back to the captured mouse position if shift+\ is pressed again. What I think might work is a hotkey that if the shift+\ is pressed, then capture the mouse postion, then, use keywait until key is pressed again then do another command. Not sure if it will work though

User avatar
mikeyww
Posts: 26599
Joined: 09 Sep 2014, 18:38

Re: help with mouse move script

Post by mikeyww » 13 Aug 2022, 12:29

Code: Select all

+\::
CoordMode, Mouse
If (x = "") {
 MouseGetPos, x, y
 SoundBeep, 1500
} Else {
 SoundBeep, 1000
 MouseMove, x, y
 x =
}
Return

reece0306
Posts: 12
Joined: 11 Aug 2021, 23:45

Re: help with mouse move script

Post by reece0306 » 13 Aug 2022, 12:46

thanks

Post Reply

Return to “Ask for Help (v1)”