Answer the question
In order to leave comments, you need to log in
I can’t click, and after finding the picture. What are the mistakes?
I want to make a script. For example, I click on a few pictures after finding the right one. I have to click in a certain place. I didn't write much code, but it ends up ignoring the image.
F4:: Pause
return
F3::
CoordMode,Pixel,Screen
CoordMode,Mouse,Screen
Label1:
sleep 350
Click 356,407
ImageSearch, OutputVarX, OutputVarY, 329, 561, 528,648, D:\Desktop\search.png
If ErrorLevel = 0
Goto , Label6
Else
{
Goto,Label2
}
Label2:
sleep 350
Click 447,408
ImageSearch, OutputVarX, OutputVarY, 329, 561, 528,648, D:\Desktop\search.png
If ErrorLevel = 0
Goto, Label6
Else
{
Goto,Label3
}
Label3:
sleep 350
Click 536,404
ImageSearch, OutputVarX, OutputVarY, 3329, 561, 528,648, D:\Desktop\search.png
If ErrorLevel = 0
Goto, Label6
Else
{
Goto,Label4
}
Label4:
sleep 350
Click 624,411
ImageSearch, OutputVarX, OutputVarY, 329, 561, 528,648, D:\Desktop\search.png
If ErrorLevel = 0
Goto, Label6
Else
{
Goto,Label5
}
Label5:
sleep 350
Click 711,409
Goto, Label1
Label6:
sleep 350
Click 464,624
return
Answer the question
In order to leave comments, you need to log in
I recommend that you first check whether the search works in principle. Maybe you made a sample picture crookedly ...
if ErrorLevel = 2
MsgBox, Какая-то проблема со скриптом
else if ErrorLevel = 0
MsgBox, Bзображение найдено
else if ErrorLevel = 1
Изображение НЕ найдено
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question