Recently I started using autohotkey and i really got addicted to it! My knowledge is very basic but i am learning really fast for someone who does not have some kind of IT background (I am proud of what i am capable of doing already).
Now i am trying to write a script that has color detection, but there is a posibility that the color changes to a single other color. I want to write a code that looks for the primary color (green, i got the color code ) (got it working untill here) but if that color is not there i want it to detect the secondary color. this is new for me and i don't quite know how to get this in my code.
This is what i got so far:
Code: Select all
1::
Loop
{
PixelSearch, x, y, 0, 0, %A_ScreenWidth%,%A_ScreenHeight% , COLORCODE, Fast
Click,%x%,%y%
sleep 1000
}
esc::ExitApp
Is there any possibility to add a second color when the first one is not found?
Because i don't want to keep asking questions and i want to learn of it, maybe with some explanation so i can do this on my own in the future
Thanks in advance,
Kind regards,
Nick