I tried many different codes. No code worked at the moment.
At first I want to introduce to my problem and what I want:
I need a AHK Code that will search in my game for at least one but better two colorcodes.
As example I take this two:
0xfbffff and 0xc84346
If they are both present on the screen the program should "Send F" than sleep 3 seconds and send F again.
After this procedure the loop should start searching again. And if they find this two codes again it should send again the "F".
I tried it with 1 PixelSearch:
#IfWinActive, Grand Theft Multiplayer
CoordMode, Pixel, Screen, RGB
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, High
Col := 3
PixelSearch, x1, y2, 0, 0, A_ScreenWidth, A_ScreenHeight, 0xc84346, Col, Fast RGB
if ErrorLevel = 0
if ErrorLevel = 2
msgbox, There was a mistake in the loop.
May someone can help me out? Thank you very much.