Autoclick with middle mouse button when cursor is in the one of the triangular areas of the screen
-
- Posts: 2
- Joined: 01 Feb 2023, 07:58
Autoclick with middle mouse button when cursor is in the one of the triangular areas of the screen
So the title. I need to create that script but I am total newbie in a programming and in ahk, so can't really comprehend how to do it. It must be something like this as in the picture. The 1, 2, 3, 4 are zones where an autoclick triggers as soon as mouse cursor enters them
- Attachments
-
- square.png (26.88 KiB) Viewed 254 times
Re: Autoclick with middle mouse button when cursor is in the one of the triangular areas of the screen
Why are you distinguishing between the four zones when the same thing is to happen in each? Aren’t you saying you want to auto-click when that entire rectangle is entered? That’s a much easier solution.
-
- Posts: 2
- Joined: 01 Feb 2023, 07:58
Re: Autoclick with middle mouse button when cursor is in the one of the triangular areas of the screen
I need this to be triggered EACH time when cursor enters one of the zones. You can imagine this if the center of the screen were the crossing between these lines
Re: Autoclick with middle mouse button when cursor is in the one of the triangular areas of the screen
Basically, you would have a variable that tracks the last zone entered, then you would need to continuously monitor the mouse coordinates using a loop and MouseGetPos and calculate what zone it’s in, which isn’t trivial but not overly complicated either. Then if the zone it determines it is in is different than what was stored, then update that variable and then gosub to the appropriate subroutine that is to be triggered.