Mouse Position Reset

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
vSky
Posts: 80
Joined: 30 May 2022, 10:13

Mouse Position Reset

Post by vSky » 24 Jun 2022, 05:38

How can I make a specific area a starting region? "93,210,1500,700" I want to do x0,y0,h1500,w700

User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Mouse Position Reset

Post by boiler » 24 Jun 2022, 06:03

What do you mean by a starting region? What are you trying to accomplish?

User avatar
vSky
Posts: 80
Joined: 30 May 2022, 10:13

Re: Mouse Position Reset

Post by vSky » 24 Jun 2022, 11:14

boiler wrote:
24 Jun 2022, 06:03
What do you mean by a starting region? What are you trying to accomplish?
Hi,
"93,210,1500,700" This is my selected field. I want to show X:93, Y:210 positions as 0. When I command "MouseMove, 100, 100", it will operate within the given area. In a way, I want to use the area I have specified in window mode.

User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Mouse Position Reset

Post by boiler » 24 Jun 2022, 16:12

You can use a custom function to move with the offset built in:

Code: Select all

CoordMode, Mouse, Screen
MouseMove(100, 100) ; moves to screen coordinates (193, 310)
return

MouseMove(x, y) {
	MouseMove, x + 93, y + 210, 0
}

User avatar
vSky
Posts: 80
Joined: 30 May 2022, 10:13

Re: Mouse Position Reset

Post by vSky » 25 Jun 2022, 02:20

boiler wrote:
24 Jun 2022, 16:12
You can use a custom function to move with the offset built in:

Code: Select all

CoordMode, Mouse, Screen
MouseMove(100, 100) ; moves to screen coordinates (193, 310)
return

MouseMove(x, y) {
	MouseMove, x + 93, y + 210, 0
}

Yes, this came to my mind, but I did not do it because there was a possibility of going out of the area. For example, when commanded as "MouseMove, 800, 1200", h1500,w700 will cross the Area limit.

Post Reply

Return to “Ask for Help (v1)”