OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Mast on June 19, 2012, 03:16:26 AM

Title: Grid escape and enter
Post by: Mast on June 19, 2012, 03:16:26 AM
Hello,
i need help with escape key and enter. With this code, the grid is not closed with enter key but the modeless dialog is closed with escape. i don't know how can i inhibit the escape key, i search on the forum but nothing exactly what i want, if you cn help me; thanks


Code (autolisp) Select

(defun c:Metre_Metre_OnCancelClose (intIsESC)   
  (/= intIsESC 1)
)
Title: Re: Grid escape and enter
Post by: Fred Tomke on June 19, 2012, 11:41:56 AM
Hi, the same event will be thrown when you press esc

Code (autolisp) Select
(defun c:Metre_Metre_OnCancelClose (intIsESC)     
  (cond
    ((= intIsESC 0) (princ "\nEnter was pressed!\n"))
    ((= intIsESC 1) (princ "\nESC was pressed!\n"))
  ); cond
); c:Metre_Metre_OnCancelClose


Regards, Fred
Title: Re: Grid escape and enter
Post by: Mast on June 22, 2012, 07:47:16 AM
Thank you Fred  :)