make script lisp-write-line error

Discussion of other Lisp dialects (Arc, Clojure, AutoLisp, XLISP, etc.)

make script lisp-write-line error

Postby au-s » Tue May 12, 2009 1:40 am


I have a lisp from original author, LEEMAC on CADTutor...

I recoded it and used DOSLib.

Here is the code:
Code: Select all
(defun c:rscr  (/ wfile rfile ofile n)
  (if (and (setq wfile "C:\\test.scr")
             (setq rfile (dos_getfilem "Select Drawings"
                             "" "DWG Files (*.dwg)|*.dwg"))
      (setq ofile (open wfile "w"))
      (foreach n
          (strcat "open \"" rfile "\" (load \"mylsip.lsp\") (c:mylisp) close \"Y\"")
      (close ofile)
      (command "script" wfile))
    (princ "\n<!> File Selection Error <!>"))

The lisp creates the scr file allthough it do not write lines into it.
Can someone help me please..
I think its wrong with foreach and write-line functions...
Posts: 2
Joined: Tue May 12, 2009 1:17 am

Re: make script lisp-write-line error

Postby Harleqin » Tue May 12, 2009 7:01 pm

I think that this is AutoLisp, not Common Lisp.

You should post this to "Other dialects", or a moderator might be able to move it there.

Anyway, it seems to me as if your write-line statement is quoted, thus not doing anything. I may be wrong, though, I am not familiar with AutoLisp.
"Just throw more hardware at it" is the root of all evil.
Posts: 71
Joined: Wed Dec 17, 2008 5:18 am
Location: Bonn, Germany

Re: make script lisp-write-line error

Postby findinglisp » Wed May 13, 2009 9:19 am

Cheers, Dave
Slowly but surely the world is finding Lisp.
Posts: 440
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX

Return to Other Dialects

Who is online

Users browsing this forum: No registered users and 1 guest