тоже самое, но только с возможностью удобной настройки и расширения
GETSCREEN
SCANPICTURE ($arr_segment, $_xmin, $_ymin, $_xmax, $_ymax, "hborder_line.bmp", - 1, 100)
$HX = $arr_segment[0] - 128 + 3
$HY = $arr_segment[1] - 232
$OX = $arr_segment[0]
$OY = $arr_segment[1] - 314 + 3
$KX = $arr_segment[0] + 128 - 3
$KY = $arr_segment[1] - 232
#define SEGMENT_HEIGHT: ($HY - $OY)
#define CHORD_LENGTH: ($KX - $HX)
$radius = INT(POW(CHORD_LENGTH, 2) / (8 * SEGMENT_HEIGHT) + SEGMENT_HEIGHT / 2)
$center_X = $HX + CHORD_LENGTH / 2
$center_Y = $OY + $radius
// По Пикселю
$angle_x = ROUND($center_X - $radius * COS(95), 0)
$angle_y = ROUND($center_Y - $radius * SIN(95), 0)
WHILE(#TRUE)
GETSCREEN($HX, $OY, $KX, $KY)
IF(PXL($angle_x, $angle_y) = 8872765)
KEYDOWN(#SPACE)
ELSE
KEYUP(#SPACE)
END_IF
END_CYC
// По картинке
WHILE(#TRUE)
GETSCREEN($HX, $OY, $KX, $KY)
IF_PICTURE_IN ($HX, $OY, $KX, $KY, "pointer.bmp", -1, 100)
IF(180 - ROUND(ARCCOS(($_return1 - $center_X) / DIST($_return1, $_return2, $center_X, $center_Y)), 0) < 90)
KEYDOWN(#SPACE)
ELSE
KEYUP(#SPACE)
END_IF
END_IF
END_CYC