@Klepto, that is indeed handy.
I modified the Kernel32.bmx and added the WinExec API declaration to it, which has turned to be successfull, and when I came here to answer filax, I've noticed your post !
:)
I have a question, where did you find the documentation of the 'system_' command ? Am I right to assume that it is a multiplatform command - that is, it would work also on a linux or a mac OS ?
Anyway, if you want to use WinExec API, then: 1) go to the pub.mod directory and make a copy of the win32.mod directory - just in case ! 2) open the win32.mod directory and locate the kernel32.bmx file 3) open the kernel32.bmx file from the IDE, and add this statement to the functions declared in it:
Function WinExec (lpCmdLine:Byte Ptr,nCmdShow)
4) save the kernel32.bmx file 5) now go in the bin directory of your main BMAX installation, and create a file .bat which contains the following statements:
bmk makemods pub.win32
pause
6) run that .bat file 7) now you can use the WinExec function:
WinExec("calc.exe",10)
Note that WinExec does not halt the calling application as the command system_ does.
Hope it helps, Sergio.
|