newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: newdep on March 25, 2005, 03:35:47 AM

Title: For the Lazy developer
Post by: newdep on March 25, 2005, 03:35:47 AM
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.
Title:
Post by: eddier on March 25, 2005, 07:00:53 AM
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
Title:
Post by: Sammo on March 25, 2005, 07:52:45 AM
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.
Title:
Post by: alex on April 06, 2005, 09:48:44 AM
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! :)
Title: Re: For the Lazy developer
Post by: alex on July 27, 2011, 12:30:04 PM
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
:-)