Make ahk run script when a color is in coordinates

Ask gaming related questions (AHK v1.1 and older)
FreshFlower
Posts: 8
Joined: 16 Jan 2023, 10:13

Make ahk run script when a color is in coordinates

Post by FreshFlower » 08 Jun 2023, 14:53

I am looking to have a script I've made run when ahk detects a specific color in a specific area on my screen, can anyone help me out with this? I don't know where I'd begin and it's hard for me to understand.

FreshFlower
Posts: 8
Joined: 16 Jan 2023, 10:13

Re: Make ahk run script when a color is in coordinates

Post by FreshFlower » 08 Jun 2023, 17:13

This is my current code,

Code: Select all

#IfWinActive Chrome
f12::exitapp
`::suspend

*LButton::
    While (GetKeyState("LButton", "P")) {
random rand, 41, 100
SendInput {Click Left}
sleep %rand%
}
I have absolutely zero idea how to implement this into my script even when looking at the docs.
Last edited by joedf on 08 Jun 2023, 17:20, edited 1 time in total.
Reason: fix [code] tags

Post Reply

Return to “Gaming Help (v1)”