For the Lazy developer

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

For the Lazy developer

Post by newdep »

Hello Lutz,

What do you think of the following option ->

Drag & Drop a Newlisp programm *.lsp onto newlisp.exe (icon/file) and then
its automaticly executed. This saved starting the console or command line.

Im not sure if it fits into the newlisp executing path but it makes starting
newlisp programs quicly under windows. probably this is too enhanced for
the newlisp code...

Also ->
As an extra, perhaps dragging a newlisp program into the console
could execute the newlisp programm as well ?


Regards, Norman.
-- (define? (Cornflakes))

eddier
Posts: 289
Joined: Mon Oct 07, 2002 2:48 pm
Location: Blue Mountain College, MS US

Post by eddier »

Actually I have done that it in the past when I worked with Windows. I created a batch file with something like that with programs before. The person could drop the file on the icon and it would run. If I remember correctly ???

Code: Select all

newlisp prog %1
where the %1 was the file that got dropped.

If you want the command shell to come up, this might work? I don't have a windows machine handy to try it but it seems logical, calle it "lisp.bat." I think there are some properties if you right click on the icon to keep the window open but I would have no idea what they would be anymore.

Code: Select all

command newlisp prog %1
Eddie

Sammo
Posts: 180
Joined: Sat Dec 06, 2003 6:11 pm
Location: Loveland, Colorado USA

Post by Sammo »

In Windows, I created a shortcut to newlisp.exe in the SendTo directory. Now, when I right-click a file, newlisp appears in the SentTo menu. Works great!

Norman's suggestion of dragging files to the newlisp-tk console is a good idea.

alex
Posts: 100
Joined: Thu Mar 10, 2005 2:27 pm
Location: Russia

Post by alex »

I use newlisp-in-batch variant sometimes.
Example:
file hw.bat contain (for example)

@goto RUNLISP
(println "Hello World!")
(exit)
:RUNLISP
@if "%newlisp%" == "" set newlisp=newlisp.exe
@if "%OS%" == "Windows_NT" %newlisp% %0 %*
@if not "%OS%" == "Windows_NT" %newlisp% "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9

Run hw.bat and be happy! :)

alex
Posts: 100
Joined: Thu Mar 10, 2005 2:27 pm
Location: Russia

Re: For the Lazy developer

Post by alex »

Final variant, I think, for Windows 2000 and more.
Add ONLY ONE short string before newlisp text!

Example:
file hw.cmd contain (for example)

Code: Select all

@newlisp.exe %0 %* & goto :EOF
# begin newlisp-program
(println "Hello World!") 
(exit)
# end newlisp-program
:-)

Locked