W
W
WeilBrain2020-12-13 20:06:36
autohotkey
WeilBrain, 2020-12-13 20:06:36

Pressing buttons with repeat ahk?

Hey! It is necessary to make sure that there is a certain button on the site, if it is not there, another button is pressed (also a button on the site) until the first button is found, after the first one is found, everything should start from the beginning. here is my shit code (first time write in ahk)

F1::

loop { ImageSearch, FoundX, FoundY, 86, 35, 1000, 576, C:\Users\User\Desktop\AHK\end.png

sleep 4000 reload if ErrorLevel = 1     MouseClick, Left, 1000, 576, if ErrorLevel = 0     MouseClick, Left, 1120, 635,     sleep 2000     MouseClick, Left, 1000, 576, } F3::reload

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WeilBrain, 2020-12-13
@WeilBrain

I didn’t really understand yet
loop { ImageSearch, FoundX, FoundY, 86, 35, 1000, 576, C:\Users\User\Desktop\AHK\end.png
exactly what should be here: FoundX, FoundY, 86, 35, 1000 , 576, (entered the coordinates of the button and its size in the screenshot).

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question