SUB(search, $x_1,$y_1,$x_2,$y_2,$proc)
$ct_x=$x_1+int(($x_2-$x_1)/2)
$ct_y=$y_1+int(($y_2-$y_1)/2)
LOGWRITE ("Центр: ", $ct_x,",",$ct_y)
$count_x=int((($x_2-$x_1)/100)*$proc)
$count_y=int((($y_2-$y_1)/100)*$proc)
LOGWRITE ("Расширение: ", $count_x,",",$count_y, " пикселов")
$x = $ct_x
$y = $ct_y
$x2 = $ct_x
$y2 = $ct_y
$check = 0
WHILE(($x>$x_1)&($y>$y_1)&($check=0))
IF_PIXEL_IN($x,$y, $x2,$y2, 6940927,782924,165512,14514161,5525233)
$check=1
LCLICK($_return1, $_return2)
ELSE
INC($x,-$count_x)
INC($y,-$count_y)
INC($x2,$count_x)
INC($y2,$count_y)
WAITMS(1)
END_IF
END_CYC
END_SUB
// поиска из центра области 0,0, $_xmax,$_ymax с процентом расширения 0.5%
GETSCREEN
search(0,0, $_xmax,$_ymax, 0.5)
WAITMS(100)
HALT