while $continue = True
$Coords1 = PixelSearch($vFullSearchCoords1, $vFullSearchCoords2, $vFullSearchCoords3, $vFullSearchCoords4, $aFullSearch[$i], 5, 1); search for den store pixel
If Not @error Then
$coordbox1 = $coords1[0] - 50; Create coord box
$cooodbox2 = $coords1[1] - 50
$coordbox3 = $coords1[0] + 75
$coordbox4 = $coords1[1] + 100
For $z = 0 to 1 step + 1
$closeCoord1 = PixelSearch($coordbox1, $coordbox2, $coordbox3, $coordbox4, $aCloseUpSearch[$i][$z], 8, 1); box search pixels
If not @error Then
$var = $var + 1
Else
$var = 0
EndIf
Next
If $var = 2 Then
and tons more that should irrelevant
All the variables are declared in the local scope earlier..