如果
是您的对话框文件
editbox是dcl ID
“数字”是编辑框或您的“th”的键。
*内存*是全局默认值
- (setq *memory* (if (and *memory* (= (type *memory*) 'STR)) *memory* "[b]0.000[/b]"))
- (defun c:test (/ dcl_id dd)
-
- (setq dcl_id (load_dialog [b][color="red"]<editbox.dcl>[/color][/b] ) dd 1)
- (while
- (or (not (numberp (read *memory*)))(= dd 1))
- (new_dialog "[color="red"]editbox[/color]" dcl_id)
- (set_tile "[color="red"]number"[/color] *memory*)
- (action_tile "accept" "(setq *memory* (get_tile "number"))(done_dialog 0)")
- (setq dd (start_dialog))
- ) ;_ end of while
- (unload_dialog dcl_id)
- (princ)
- ) ;_ end of defun
|