• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    Valued Contributor
    Posts: 51
    Registered: ‎10-06-2008

    Stop when ESC is pressed

    107 Views, 1 Replies
    03-27-2009 04:40 AM
    Hi!

    I made a little programme, that demonstrates Monte Carlo method. In this I would like to use a while loop, so it draws points until user presses ESC or ENTER.
    How can I do this? What I've tried so far just made an error when ESC was pressed.

    Thx for your help!
    Please use plain text.
    *Pro
    scot-65
    Posts: 1,928
    Registered: ‎12-11-2003

    Re: Stop when ESC is pressed

    03-27-2009 02:50 PM in reply to: sunchase
    (while (> (getvar "cmdactive") 0) (command pause) );while

    ???
    Please use plain text.