Author Topic: Problem with "ErrNo" and "Enter"  (Read 744 times)

0 Members and 1 Guest are viewing this topic.

whdjr

  • Guest
Problem with "ErrNo" and "Enter"
« 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?

Code: [Select]
(initget 6 "Apple Orange")
(entsel "\nSelect your favorite fruit [Apple/Orange] <Apple> :  ")

whdjr

  • Guest
Re: Problem with "ErrNo" and "Enter"
« Reply #1 on: October 17, 2008, 10:13:05 AM »
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.

whdjr

  • Guest
Re: Problem with "ErrNo" and "Enter"
« Reply #2 on: October 17, 2008, 10:24:53 AM »
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.

T.Willey

  • Needs a day job
  • Posts: 5218
Re: Problem with "ErrNo" and "Enter"
« Reply #3 on: October 17, 2008, 11:38:05 AM »
Something like this?

Code: [Select]
(initget 6 "Apple Orange")
(setq Sel
    (cond
        ((entsel "\nSelect your favorite fruit [Apple/Orange] <Apple> :  "))
        (t "Apple")
    )
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.