Page 1 of 1

Press key if color detected

Posted: 25 Sep 2022, 13:36
by iJohnny
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!

Re: Press key if color detected

Posted: 26 Sep 2022, 05:19
by iJohnny
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.