AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

ok_only.

ok_only

Syntax: 

	ok_only;

The ok_only tile is defined in the Base.Dcl file.
The key of the OK button is 'accept'. 
DCL Coding: 
lisp48a : dialog {				//dialog name
          label = "ok_only" ;			//give it a label

        ok_only ;				//predefined OK button

        }					//end dialog

AutoLisp Coding: 
(defun C:lisp48a ()
;define function	

  (setq dcl_id (load_dialog "lisp48a.dcl"))
  ;load dialog

  (if (not (new_dialog "lisp48a" dcl_id)
  ;test for dialog

      );not

    (exit)
    ;exit if no dialog

  );if

  (action_tile
      "accept"	
      ;if O.K. pressed
					
      "(done_dialog) (setq userclick T)"
      ;close dialog, set flag	
	
   );action tile

  (start_dialog)	
  ;start dialog
				
  (unload_dialog dcl_id)
  ;unload	

  (if userclick
  ;if OK selected

    (alert "You Choose O.K.")
    ;inform the user

  );if			

 (princ)

);defun

(princ)
 
The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website