Author Topic: (code) vl-filename-mktemp  (Read 3307 times)

0 Members and 1 Guest are viewing this topic.


  • Custom Title
  • Seagull
  • Posts: 28708
(code) vl-filename-mktemp
« on: December 12, 2003, 07:47:29 AM »
Something to think about when you want to make ->load ->run -> delete some code.
Code: [Select]
(defun mst-run_remove ( / tf tfo)
  (if (setq tf (vl-filename-mktemp nil nil ".tmp"))
    (setq tfo (open tf "w")))

 (if tfo
      (write-line "(defun me1 (/ name age)" tfo)
      (write-line "(if (setq name (getstring T \"\\nEnter Your Name: \"))" tfo)
      (write-line "(setq age (itoa (getint \"\\nEnter Your Age: \")))" tfo)
      (write-line ")" tfo)
 "(alert (strcat \"Thanks for that info \"name\"\\nI did not know you were \"age))"
      (write-line ")" tfo)
  (close tfo)
  (load tf)
  (if (vl-file-delete tf)(princ "\nCleanup finished"))
  )  (serving the CAD community since 2003)