This is a file I am keeping for some time now, collecting useful little functions from the board: http://www.newlisp.org/index.cgi?page=Code_Snippets
Lutz
Good start and nice that you link it under 'Tips and Tricks'.
(BTW: Why no navigation footer on this page?)
There is an error in the last example: Run a Win32 shell and hide window
I believe that function should be:
(define (winexec)
(import "shell32.dll" "ShellExecuteA")
(apply ShellExecuteA (args)))
(Maybe we don't even need to import the ShellExecuteA every time...)
This make this function... -> makes
--------
Would anybody know how to hide window of newlisp.exe right from the start? (So it is completely invisible.)
Any possible way - using batch file, some parameters for newlisp.exe, ... ???
Thank you, Fanda
The code snippet in http://newlisp.org/index.cgi?page=Code_Snippets (last item) defines the function 'winexec' correctly. The construct with 'args' is not necessary. The defined 'winexec' can be used directly after importing it when using as shown in the header of the code snippets. This is not a lambda function definition, but 'define' here is used as a 'setq'
(define winexec
(import "shell32.dll" "ShellExecuteA"))
;; is equivalent to
(set 'winexec (import "shell32.dll" "ShellExecuteA"))
but the first form of the assignment documents better the itention of creating a function. See the documentation for 'define' in the manual.
Lutz
Thanks for explaining. Somehow it didn't work for me the first time. I have tried to recreate the situation when it didn't work, but now it is OK every time :-)))
----------
So, does anybody know how to hide the window of newlisp.exe right from the start?
Thank you, Fanda
PS: Lutz, you forgot to change the date of "last updated 2005-08-18".
And, please excuse me for posting mostly errors, or what I think are the errors.
Hi Fanda,
You can hide the DOSBOX in which newLisp starts with my 'run'-tool:
http://www.turtle.dds.nl/run/index.html
Or, you could recompile newLisp with MinGW, after editing the file 'makefile_mingw'. You have to add '-mwindows' to the link flags.
Peter
Thanks Peter, it works!
I don't usually deal with the system-level stuff, so it would take me ages to figure that out :-)))
Fanda