Press key if color detected

Ask gaming related questions (AHK v1.1 and older)
iJohnny
Posts: 8
Joined: 25 Sep 2022, 13:22

Press key if color detected

Post by iJohnny » 25 Sep 2022, 13:36

Hey guys, new here looking for some help for a simple script.

The task is simple, in game I need to press E to start, it will show up the bar and I need to press E again once it's in the right place.

Telling me to press E to start:
https://imgur.com/PbyBKpP

Task started:
https://imgur.com/BVfbe8C

Ready to finish task:
https://imgur.com/xW56iy7

As you can see once it's ready to finish the task, it will turn slightly red on the rectangle so I was thinking of trying to detect when that color was on screen and press E, but i'm open to any ideas on how I could get this to work on repeat!

iJohnny
Posts: 8
Joined: 25 Sep 2022, 13:22

Re: Press key if color detected

Post by iJohnny » 26 Sep 2022, 05:19

I was thinking it could start by searching if the bar is on screen.
If it does not find the color green then press E.
If it finds the color green then wait until it finds the color red and once it finds the color red then press E
and repeat.

Anyone able to help with this please? I tried all night yesterday without any success.

Post Reply

Return to “Gaming Help (v1)”