Page 1 of 1

For the Lazy developer

Posted: Fri Mar 25, 2005 11:35 am
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.

Posted: Fri Mar 25, 2005 3:00 pm
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

Posted: Fri Mar 25, 2005 3:52 pm
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.

Posted: Wed Apr 06, 2005 4:48 pm
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! :)

Re: For the Lazy developer

Posted: Wed Jul 27, 2011 7:30 pm
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
:-)