'system' is easy to use, but it opens a command prompt whenever you call it:
Code:
system "dir & echo Hello World & pause"
If you want to launch a program it's better to use 'shellexecute'. If the following program is executed from the c:\N6 directory, it will launch the naalaa ide and wait until you close it:
Code:
shellexecute "open", "NED6.exe", "", "", true
If you set the last parameter to false, your program will continue running without waiting for the new instance of the ide to close.
This piece of code let's the user select an exe file to run:
Code:
f$ = openfile("exe");
shellexecute "open", f$, "", "", true
The third parameter can be used for setting the directory where the program you want to execute is located. It's not needed in the example above, since f$ itself will contain the full path. The fourth one is for sending parameters to the program.