Author Topic: How do I know witch action produced the error????  (Read 3218 times)

0 Members and 1 Guest are viewing this topic.

d2010

  • Bull Frog
  • Posts: 326
Re: How do I know witch action produced the error????
« Reply #15 on: February 09, 2021, 12:42:35 PM »
For quick-question of user/s, then you must use
dyn=dfn_getx_readkey("[YNynA]";;wcmatch-format
                          "Do you  finishied selecting objects and proceed?(yY-yes)(no/n)(Aa.about");
if (dyn="N") then user-select-more
if (dyn="Y") then Start-Proceesing..
if (dyn="y") then Start-Proceesing..
if (dyn="y") then Abort-quick-Exit;
 :blink:
Avantajul functiei ca "dfn_getx_readkey" nu necesita multe (doar 1 tasta si gata)
YN1. un fel de shortcut pentru user/s.
Code: [Select]
;;Inf:Wait until press keys k
(defun dfn_getx_readkey(k574 t469 / retc kbd msg two chk lei)
  (setq;|a48330|;
retc (chr 0)
kbd (if (>  k574 "") k574 "")) (setq;|a48390|;
msg (if (>  t469 "") t469 "\nt469errorStr:")) (prompt msg) (progn (setq;|a48440|;
chk (if (>  (strlen kbd) 1) 0 1)) (while (=  chk 0) (progn  (setq;|a48496|;
two 0) (while (/= two 2) (setq;|a48534|;
lei (grread)
two (car lei)) (setq;|a48582|;
retc (strcase (chr (cadr lei)))) (setq;|a48622|;
chk (if (>  kbd "") (if (wcmatch retc kbd) 1 0) 0)))))) (princ retc)
retc);; ByA=DragneAdrian@d2010

So, as there is not possibility of knowing when the user is finishing selecting objects and proceed or when he/she wants to cancel, I opted for asking to enter the total number of objects to be selected and processed at the beginning of the function.
« Last Edit: February 09, 2021, 12:48:18 PM by d2010 »