For the Lazy developer

Started by newdep, March 25, 2005, 03:35:47 AM

Previous topic - Next topic

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

#1
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 ???



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.



command newlisp prog %1


Eddie

Sammo

#2
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

#3
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

#4
Final variant, I think, for Windows 2000 and more.

Add ONLY ONE short string before newlisp text!



Example:

file hw.cmd contain (for example)

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