TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: whdjr on October 17, 2008, 09:56:55 AM
-
I want to prompt the user to either pick a selection on screen or select some keywords I provided. I also give them the option to just right click or press enter to select the default. The problem is a right click or enter is detected as an ErrNo Code 52 which I then terminate the command.
Can I differentiate between a right click and pressing enter and how if possible?
(initget 6 "Apple Orange")
(entsel "\nSelect your favorite fruit [Apple/Orange] <Apple> : ")
-
I know the simplest solution would be to just take out the default and that would solve all my problems but I would like to try to leave it in if I can.
-
If anybody comes up with a good option let me know, but for now I think I can let my right click not terminate the program during that one selection.
-
Something like this?
(initget 6 "Apple Orange")
(setq Sel
(cond
((entsel "\nSelect your favorite fruit [Apple/Orange] <Apple> : "))
(t "Apple")
)
)