 - (defun c:test ()
- (setq run T)
- (while (equal run T)
- (setq res (grread T))
- (setq code (car res))
- ;; 'normal' mouse move?
- (if (equal code 5)
- (progn
- ;; get the current cursor position
- (setq pt (car (cdr res)))
- ;; is there something at the
- ;; current position?
- (setq ss (ssget pt))
- (if (/= ss nil)
- ;; yes, there is something.
- ;; show the grip points.
- (sssetfirst nil ss)
- )
- )
- )
- ;; right mouse click?
- (if (equal code 25)
- (progn
- ;; right mouse button clicked.
- ;; exit the loop.
- (princ "\nRight mouse click.\n")
- (setq run nil)
- )
- )
- )
- )
|