Show Time example
 - (defun c:t1 (/ dcl fn f time)
- (if (and (setq time (menucmd "M=$(edtime,0,YYYY/MO/DD HH:MM DDDD)")
- fn (strcat (getvar 'tempprefix) "tmp.dcl")
- )
- (setq f (open fn "w"))
- (write-line
- (strcat "test:dialog {label=\"面板时间 : " time
- "\" ; " " :boxed_column { label = \""
- time "\" ;"
- " :column { :row { :button { key = \"t1\" ;label = \""
- time "\" ;width = 5 ; }}}}"
- "ok_cancel; " " :text { label = \""
- time "\"; alignment = centered; }}"
- )
- f
- )
- )
- (progn (close f)
- (setq dcl (load_dialog fn))
- (new_dialog "test" dcl)
- (action_tile "t1" "(alert time)")
- (action_tile "accept" "(done_dialog)")
- (start_dialog)
- (unload_dialog dcl)
- )
- )
- (princ)
- )
|