While 1
$result = _imagesearch("tools/close.bmp", 1, $x, $y, 50)
If $result = 1 Then
MouseClick("left", $x, $y)
EndIf
$result2 = _imagesearch("tools/close2.bmp", 1, $x, $y, 50)
If $result2 = 1 Then
MouseClick("left", $x, $y)
EndIf
$result3 = _imagesearch("tools/close3.bmp", 1, $x, $y, 50)
If $result3 = 1 Then
MouseClick("left", $x, $y)
EndIf
$result4 = _imagesearch("tools/close4.bmp", 1, $x, $y, 50)
If $result = 1 Then
MouseClick("left", $x, $y)
EndIf
$result5 = _imagesearch("tools/close5.bmp", 1, $x, $y, 50)
If $result = 1 Then
MouseClick("left", $x, $y)
EndIf
why is this script presing me the variable multiple times? how can i add a short sleep after the click if image was found so that the speed of the script is not reduced