it checks if pixel color is a color, if it uses (f5), and not if it uses (f1)
the problem is that it only uses f5 and uses it all the time even without being pixelcolor
Can someone help me ?
I tested these two script's and I didn't get any
first:
Code: Select all
#IfWinActive, ahk_class
CoordMode, Pixel, Screen
while(1)
color:= 0
40x := 1257
75x := 1281
varcoordy := 143
PixelGetColor, color, %75x%, %40x%, %varcoordy%, RGB
if (color != 0xDB4F4F And Check75 != 0x45526E)
{
Send, {f5}
}
Else (color != 0xDB4F4F And Check40 != 0x45526E)
{
Send, {f1}
}
Sleep, 200
continue
}
}
return
second script :
Code: Select all
#SingleInstance, Force
SetKeyDelay,0
40x := 1257
75x := 1281
Loop,
{
If WinActive("Chrome")
{
PixelSearch, check75x, check75y, 1210, 147, 1281, 147, 0xDB4F4F, 3, Fast
PixelSearch, check40x, check40y, 1210, 147, 1257, 147, 0xDB4F4F, 3, Fast
If (Check75 != 0xDB4F4F And Check40 != 0xDB4F4F)
Send, {F5}
Else If (Check75 != 0xDB4F4F)
Send, {F1}
}
Sleep, 1000
}
Return