(defun c:JFK ()
        (setq vctr (getvar "viewctr")
              ysize (getvar "viewsize")
              smin (getvar "vsmin")
              smax (getvar "vsmax")
              ymin (- (cadr vctr) (/ ysize 2.0))
              xsize (* ysize (/ (- (car smax) (car smin))
                                (- (cadr smax) (cadr smin))))
              xmin (- (car vctr) (/ xsize 2.0))
        )
    (COMMAND "VSLIDE" "sw")
          (setq p (getpoint "\nWhich one you want to select ?"))
       (SETQ XS (CAR P)
             YS (CADR P)
             XSTEP (/ XSIZE 4)
             YSTEP (/ YSIZE 12)
       )
(IF (AND (> XS (+ XMIN (* 0 XSTEP))) (< XS (+ XMIN (* 1 XSTEP))))
    (progn
    (if (and (> YS YMIN) (< YS (+ YMIN YSTEP)))
       (SETQ li 45))
    (if (and (> YS (+ ymin (* 1 ystep))) (< YS (+ YMIN (* 2 YSTEP))))
       (SETQ li 44))
    (if (and (> YS (+ ymin (* 2 ystep))) (< YS (+ YMIN (* 3 YSTEP))))
       (SETQ li 30))
    (if (and (> YS (+ ymin (* 3 ystep))) (< YS (+ YMIN (* 4 YSTEP))))
       (SETQ li 29))
    (if (and (> YS (+ ymin (* 4 ystep))) (< YS (+ YMIN (* 5 YSTEP))))
       (SETQ li 28))
    (if (and (> YS (+ ymin (* 5 ystep))) (< YS (+ YMIN (* 6 YSTEP))))
       (SETQ li 24))
    (if (and (> YS (+ ymin (* 6 ystep))) (< YS (+ YMIN (* 7 YSTEP))))
       (SETQ li 20))
    (if (and (> YS (+ ymin (* 7 ystep))) (< YS (+ YMIN (* 8 YSTEP))))
       (SETQ li 3))
    (if (and (> YS (+ ymin (* 8 ystep))) (< YS (+ YMIN (* 9 YSTEP))))
       (SETQ li 8))
    (if (and (> YS (+ ymin (* 9 ystep))) (< YS (+ YMIN (* 10 YSTEP))))
       (SETQ li 2))
    (if (and (> YS (+ ymin (* 10 ystep))) (< YS (+ YMIN (* 11 YSTEP))))
       (SETQ li 1))
    (if (and (> YS (+ ymin (* 11 ystep))) (< YS (+ YMIN (* 12 YSTEP))))
       (SETQ li 1000))
    ))
(IF (AND (> XS (+ XMIN (* 1 XSTEP))) (< XS (+ XMIN (* 2 XSTEP))))
    (progn
    (if (and (> YS YMIN) (< YS (+ YMIN YSTEP)))
       (SETQ li 35))
    (if (and (> YS (+ ymin (* 1 ystep))) (< YS (+ YMIN (* 2 YSTEP))))
       (SETQ li 34))
    (if (and (> YS (+ ymin (* 2 ystep))) (< YS (+ YMIN (* 3 YSTEP))))
       (SETQ li 33))
    (if (and (> YS (+ ymin (* 3 ystep))) (< YS (+ YMIN (* 4 YSTEP))))
       (SETQ li 32))
    (if (and (> YS (+ ymin (* 4 ystep))) (< YS (+ YMIN (* 5 YSTEP))))
       (SETQ li 31))
    (if (and (> YS (+ ymin (* 5 ystep))) (< YS (+ YMIN (* 6 YSTEP))))
       (SETQ li 25))
    (if (and (> YS (+ ymin (* 6 ystep))) (< YS (+ YMIN (* 7 YSTEP))))
       (SETQ li 21))
    (if (and (> YS (+ ymin (* 7 ystep))) (< YS (+ YMIN (* 8 YSTEP))))
       (SETQ li 9))
    (if (and (> YS (+ ymin (* 8 ystep))) (< YS (+ YMIN (* 9 YSTEP))))
       (SETQ li 10))
    (if (and (> YS (+ ymin (* 9 ystep))) (< YS (+ YMIN (* 10 YSTEP))))
       (SETQ li 5))
    (if (and (> YS (+ ymin (* 10 ystep))) (< YS (+ YMIN (* 11 YSTEP))))
       (SETQ li 4))
    (if (and (> YS (+ ymin (* 11 ystep))) (< YS (+ YMIN (* 12 YSTEP))))
       (SETQ li 11))
    ))
(IF (AND (> XS (+ XMIN (* 2 XSTEP))) (< XS (+ XMIN (* 3 XSTEP))))
    (progn
    (if (and (> YS YMIN) (< YS (+ YMIN YSTEP)))
       (SETQ li 40))
    (if (and (> YS (+ ymin (* 1 ystep))) (< YS (+ YMIN (* 2 YSTEP))))
       (SETQ li 39))
    (if (and (> YS (+ ymin (* 2 ystep))) (< YS (+ YMIN (* 3 YSTEP))))
       (SETQ li 38))
    (if (and (> YS (+ ymin (* 3 ystep))) (< YS (+ YMIN (* 4 YSTEP))))
       (SETQ li 37))
    (if (and (> YS (+ ymin (* 4 ystep))) (< YS (+ YMIN (* 5 YSTEP))))
       (SETQ li 36))
    (if (and (> YS (+ ymin (* 5 ystep))) (< YS (+ YMIN (* 6 YSTEP))))
       (SETQ li 26))
    (if (and (> YS (+ ymin (* 6 ystep))) (< YS (+ YMIN (* 7 YSTEP))))
       (SETQ li 22))
    (if (and (> YS (+ ymin (* 7 ystep))) (< YS (+ YMIN (* 8 YSTEP))))
       (SETQ li 17))
    (if (and (> YS (+ ymin (* 8 ystep))) (< YS (+ YMIN (* 9 YSTEP))))
       (SETQ li 19))
    (if (and (> YS (+ ymin (* 9 ystep))) (< YS (+ YMIN (* 10 YSTEP))))
       (SETQ li 7))
    (if (and (> YS (+ ymin (* 10 ystep))) (< YS (+ YMIN (* 11 YSTEP))))
       (SETQ li 6))
    (if (and (> YS (+ ymin (* 11 ystep))) (< YS (+ YMIN (* 12 YSTEP))))
       (SETQ li 12))
    ))
(IF (AND (> XS (+ XMIN (* 3 XSTEP))) (< XS (+ XMIN (* 4 XSTEP))))
    (progn
    (if (and (> YS YMIN) (< YS (+ YMIN YSTEP)))
       (SETQ li 1000))
    (if (and (> YS (+ ymin (* 1 ystep))) (< YS (+ YMIN (* 2 YSTEP))))
       (SETQ li 1000))
    (if (and (> YS (+ ymin (* 2 ystep))) (< YS (+ YMIN (* 3 YSTEP))))
       (SETQ li 43))
    (if (and (> YS (+ ymin (* 3 ystep))) (< YS (+ YMIN (* 4 YSTEP))))
       (SETQ li 42))
    (if (and (> YS (+ ymin (* 4 ystep))) (< YS (+ YMIN (* 5 YSTEP))))
       (SETQ li 41))
    (if (and (> YS (+ ymin (* 5 ystep))) (< YS (+ YMIN (* 6 YSTEP))))
       (SETQ li 27))
    (if (and (> YS (+ ymin (* 6 ystep))) (< YS (+ YMIN (* 7 YSTEP))))
       (SETQ li 23))
    (if (and (> YS (+ ymin (* 7 ystep))) (< YS (+ YMIN (* 8 YSTEP))))
       (SETQ li 18))
    (if (and (> YS (+ ymin (* 8 ystep))) (< YS (+ YMIN (* 9 YSTEP))))
       (SETQ li 16))
    (if (and (> YS (+ ymin (* 9 ystep))) (< YS (+ YMIN (* 10 YSTEP))))
       (SETQ li 15))
    (if (and (> YS (+ ymin (* 10 ystep))) (< YS (+ YMIN (* 11 YSTEP))))
       (SETQ li 14))
    (if (and (> YS (+ ymin (* 11 ystep))) (< YS (+ YMIN (* 12 YSTEP))))
       (SETQ li 13))
    ))
(redraw)
(setq fi "C:/R11/SYS/incese.txt")
(if (/= li 1000)
(progn
(setq pi (getpoint "Please give me an input point:"))
 (setq fl (open fi "r"))
 (setq rf (repeat li (read-line fl)))
 (command "text" pi "" "" rf)
))
)
