message

Discussion in 'AutoCAD' started by martin, Feb 22, 2004.

  1. martin

    martin Guest

    i know how to put a message on screen in lisp, but is it possible to make it
    disappear automatically after let's say 5 seconds?
    martin
     
    martin, Feb 22, 2004
    #1
  2. martin

    favline Guest

    Is the message via a dcl message box?

    Try the delay command: for 5 sec
    (command "delay" "5000")
     
    favline, Feb 22, 2004
    #2
  3. If you use DOSLIB (R. Mcneel & Assoc.), it has a function called
    (dos_splash) which will display a splash screen with any desired BMP file
    for a set number of seconds. www.mcneel.com
     
    Phil Kenewell, Feb 23, 2004
    #3
  4. martin

    martin Guest

    it's (alert) in lisp
    martin
     
    martin, Feb 23, 2004
    #4
  5. martin

    ECCAD Guest

    Martin,
    Crude..but will work. Does text insert. If you do a 'dialog' of any kind (e.g. .dcl load, alert..etc), will not 'disappear' until you 'inter-act' to it.

    ----------------------
    (defun get_date ( / A yr mo dax hr mi); second (se) passed on
    (setq A (rtos (getvar "CDATE") 2 6)) ; get Julian date
    (if (/= A nil)
    (progn
    (setq yr (substr A 3 2)); year (2 digit)
    (setq mo (substr A 5 2)); month
    (setq dax (substr A 7 2)); day
    (setq hr (substr A 10 2)); hour
    (setq mi (substr A 12 2)); minute
    (setq se (substr A 14 2)); second
    (princ)
    ); end progn
    ); end if
    ); end get_date
    ;
    ; Print your message...
    ;
    (command "_text" "10,10" "0.125" "0" "THIS MESSAGE WILL SHOW UP FOR 5 SECONDS !")
    ;
    ; wait in loop for 5 seconds..
    ;
    (get_date)
    (setq sec (atoi se))
    (if (or (= sec 55)(> sec 55))
    (setq target (- sec 55)); 0 thru 4
    (setq target (+ sec 5))
    ); end if
    (while (/= sec target)
    (get_date)
    (setq sec (atoi se))
    ); end while
    (command "_erase" "_L" "")
    (command)
     
    ECCAD, Feb 23, 2004
    #5
  6. martin

    BillZ Guest

    Dos_msgbox also has the ability to accept an amount of time to be displayed.

    (setq answer (dos_msgbox "This Program does this or that." "AutoCAD Message" 4 3))

    Bill
     
    BillZ, Feb 24, 2004
    #6
  7. martin

    BillZ Guest

    Dos_msgbox also can accept an amount of time to be displayed.

    (setq answer (dos_msgbox "This Program does this or that." "AutoCAD Message" 4 3))

    Bill
     
    BillZ, Feb 24, 2004
    #7
  8. If your talking about just text - DOSLIB also has a message box function
    that has an optional argument to close the dialog after a set number of
    seconds. (dos_msgbox)
     
    Phil Kenewell, Feb 24, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.