I want to write a script that will work in a mini-game like "Flappy Bird"
Let's say fish "X" swims and there is a hook "Y". The hook moves only when the LMB is held down and goes out to the standard position if the LMB is released.
Need a script.
So that when a picture "X" is found on the screen, the script clicks on the mouse (which constantly goes up) and holds the picture "X" at the position of the picture "Y"
But at the very beginning I faced a similar problem.
The script does not want to react to the PNG that I cut out.
Tried different sizes. It does not even react to PNG not in the game itself, but on the folder in which it is located. But it reacts to the screen made in the browser.
Code: Select all
F2::
imgFound := false
while(imgFound = false)
{
ImageSearch, X, Y, 0, 0, A_ScreenWidth, A_ScreenHeight, test.png
if (x тут скобки угловые "")
{
click, %x%, %y%
Sleep 100
click, %x%, %y%
Sleep 100
click, %x%, %y%
MsgBox Изображение найдено в координатах x=%x%, y=%y%.
imgFound := true
}
}
return
What am I doing wrong?
If you help me in writing or just to understand why it does not work, then I will be very grateful!