Help with auto click

Ask gaming related questions (AHK v1.1 and older)
Moryd
Posts: 2
Joined: 19 Aug 2022, 18:23

Help with auto click

Post by Moryd » 19 Aug 2022, 18:37

Hello,
I need help writing a script namely:
if in the area ABCD (rectangle, A-1134,811; B-1138,887; C-1772,815; D-1778,882) the button turns orange (6B2811 + 15 shades) it clicks me once with the left mouse button in the area - 1448,839. I would like the script to fire under the X button and only work when it uses the hotkey after the action (click when orange) it waits to re-engage. Thank you ;p

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

Re: Help with auto click

Post by mikeyww » 19 Aug 2022, 21:23

Welcome to this AutoHotkey forum!

If you think it's a rectangle, you could be in for a rough time!

image220819-2230-001_cr.png
Rectangle???
image220819-2230-001_cr.png (31.48 KiB) Viewed 551 times

Moryd
Posts: 2
Joined: 19 Aug 2022, 18:23

Re: Help with auto click

Post by Moryd » 20 Aug 2022, 05:53

I've corrected the coordinates, but I'm more concerned with the content of the script to make it react to the colour in the area, as I'm a layman and have no idea how to go about it.
A- 1127,812
B- 1659, 816
C- 1188, 880
D- 1686, 880

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

Re: Help with auto click

Post by mikeyww » 20 Aug 2022, 06:14

Although I'm harping on the coordinates, they would matter because an AutoHotkey search using PixelSearch occurs in a rectangular area. How are you determining whether your own coordinates form a rectangle? Although I created a picture, can the numbers alone determine it?

(From my perspective, as soon as I glance at your four pairs of numbers, I can tell without creating a picture that your coordinates do not form a rectangle. No arithmetic or graphics are needed.)

To my knowledge, PixelSearch requires not only a rectangle, but one that is "horizontally or vertically oriented", so to speak-- not rotated. One could search in multiple such areas if needed, or could even search a single pixel.

Post Reply

Return to “Gaming Help (v1)”