- ;; tt(屏幕定距移动)
- (defun c:tt ()
- (princ "\n键盘操作: w-上移/z-下移/a-左移/s-右移/鼠标左右键或空格退出")
- (setq os (getvar "osmode"))
- (setvar "osmode" 0)
- (setq dx 59400
- dy 42000
- mode t
- )
- (while mode
- (setq mo (grread t 15 0)
- co (car mo)
- )
- (cond ((member co '(3 25)) (setq mode nil))
- ((= (cadr mo) 97) (command "pan" '(0 0) (list (- dx) 0)))
- ((= (cadr mo) 115) (command "pan" '(0 0) (list dx 0)))
- ((= (cadr mo) 122) (command "pan" '(0 0) (list 0 (- dy))))
- ((= (cadr mo) 119) (command "pan" '(0 0) (list 0 dy)))
- ((= (cadr mo) 32) (setq mode nil))
- )
- )
- (setvar "osmode" os)
- (princ)
- )
|