Author Topic: Shell  (Read 2218 times)

0 Members and 1 Guest are viewing this topic.

GDF

  • Water Moccasin
  • Posts: 2081
Shell
« on: July 11, 2006, 02:56:20 PM »
Ok, I'm having a brain fart.

(command ".shell" "notepad C:\\Temp\\SheetIndex.txt") works fine.

Now how do I get this to work? (command ".shell" (strcat "notepad " file "\\SheetIndex.txt"))
where file "F:\\JOBS\\2005\\050207B\\ACAD"

I get the following error when using the code below:
#<FILE internal>.shell
OS Command: ; error: bad argument type: stringp #<FILE internal>

(cond
     ;;((= op "accept")(command ".shell" "notepad C:\\Temp\\SheetIndex.txt"))
    ((= op "accept")(PRINC FILE)(command ".shell" (strcat "notepad " file "\\SheetIndex.txt")))     


Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Shell
« Reply #1 on: July 11, 2006, 03:17:17 PM »
Just use
Code: [Select]
(startapp "notepad.exe" (strcat file "\\SheetIndex.txt"))
Tim

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

Please think about donating if this post helped you.

GDF

  • Water Moccasin
  • Posts: 2081
Re: Shell
« Reply #2 on: July 11, 2006, 03:38:38 PM »
Just use
Code: [Select]
(startapp "notepad.exe" (strcat file "\\SheetIndex.txt"))

Tim

Thanks, this puppy made a bobo, Iused the wrong var. I should have used folder in lieu of file.
Both ways now work. I have properly cleaned up after myself.

file was set to : (setq file (open (strcat folder "\\SheetIndex.txt") "w"))
I should have used folder varable. That was why I was getting the internal error.


Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Shell
« Reply #3 on: July 11, 2006, 04:01:19 PM »
Glad you got it working.
Tim

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

Please think about donating if this post helped you.