Code: Select all
t::
CoordMode, Pixel, Window
PixelSearch, ColorLocationX, ColorLocationY, 785, 555, 855, 575, 0x604331, 0, Fast RGB
If (ErrorLevel = 0)
{
%ColorLocationY% := %ColorLocationY% + 10
MouseClick, Left, %ColorLocationX%, %ColorLocationY%, 1, , ,
}
Else
{
MsgBox, 64, AutoTribe, Error! #1 - Nie znaleziono pasujacego piksela, 3
}
Sleep, 250
CoordMode, Pixel, Window
ImageSearch, ZaprosLocationX, ZaprosLocationY, 0, 0, 1366, 768, %A_Desktop%\AutoTribe\Zapros.png
If (ErrorLevel = 0)
{
MouseClick, Left, %ZaprosLocationX%, %ZaprosLocationY%, 1, , ,
}
Else
{
MsgBox, 64, AutoTribe, Error! #2 - Nie znaleziono przycisku Zapros, 3
}
Return
1) I press T key
2) Script finds pixel and image
3) When I again press T key, the X coordinate of pixel should be enlarged by 10
4) It should happen every time, when I press T key
I tried this script above, but it returns error, that dynamic variable declared by me is blank.
What am I doing wrong?