Hello,
I want to use the ImageSearch function in order to search 10-15 different 15x15 Pixel pictures. But the problem is that the pictures are from a GIF you could say. So I'm just looking for one picture of it. Using ImageSearch to find 1 picture in a gif, there is no problem. But when I do something like 10 If functions to find one of the 10 pictures, the script doesn't find them:
While 1
$IS = _ImageSearch("weissgelb.png",1,$outputx,$outputy,40)
If $IS = 1 Then
MouseClick("left",$outputx,$outputy,1)
wartenaufglitzieinsammlung()
EndIf
$IS = _ImageSearch("gelb.png",1,$outputx,$outputy,40)
If $IS = 1 Then
MouseClick("left",$outputx,$outputy,1)
wartenaufglitzieinsammlung()
EndIf
$IS = _ImageSearch("gruenblau.png",1,$outputx,$outputy,40)
If $IS = 1 Then
MouseClick("left",$outputx,$outputy,1)
wartenaufglitzieinsammlung()
EndIf
$IS = _ImageSearch("orange.png",1,$outputx,$outputy,60)
If $IS = 1 Then
MouseClick("left",$outputx,$outputy,1)
wartenaufglitzieinsammlung()
EndIf
$IS = _ImageSearch("weissgruen.png",1,$outputx,$outputy,40)
If $IS = 1 Then
MouseClick("left",$outputx,$outputy,1)
wartenaufglitzieinsammlung()
EndIf
$IS = _ImageSearch("blaugelb.png",1,$outputx,$outputy,40)
If $IS = 1 Then
MouseClick("left",$outputx,$outputy,1)
wartenaufglitzieinsammlung()
EndIf
$IS = _ImageSearch("hellblaugelb.png",1,$outputx,$outputy,50)
If $IS = 1 Then
MouseClick("left",$outputx,$outputy,1)
wartenaufglitzieinsammlung()
EndIf
$IS = _ImageSearch("rotlila.png",1,$outputx,$outputy,50)
If $IS = 1 Then
MouseClick("left",$outputx,$outputy,1)
wartenaufglitzieinsammlung()
EndIf
WEnd
My thesis is that while my desktop shows the fitting picture for picture 3, the script is actually searching for picture 11 so it doesn't react to picture 3.
This way of searching many pictures is inefficient in my opinion so does someone know how to improve my script? With ImageSearchArea I would just get minimal improvement because I'm looking for almost my complete desktop. And also 15x15 pixel is the minimum size for the pictures because otherwise the script doesn't find them anyway. Or maybe there is a better function than ImageSearch in order to search for several pictures. Maybe also important information: When the script found one of the pictures I want to start a new function so it won't search anymore for the pictures. Maybe there is also an alternative or something that makes it more efficient than my actual script
My mother language is not english so feel free to ask me if you didn't understand something
sincerly
money