ExecFile (filename$)  

Definition:

Runs an external executable program from within a Blitz program.

Parameter Description:


filename$ = any valid variable or path/filename to the executable program

Command Description:

Use this command to halt execution of your program and run an external program.

The usefulness of this command is really mostly for calling some system level command, launching a browser, etc. Without the ability to playback a movie (for cutscenes, etc) I would think the most useful part of this is command would be calling a self-contained .exe movie (a la BLINK) to play as an intro, then when its completed, return to your program for continued execution.

Note: This command uses ShellExecute to allow you to 'open' any file (like a .doc or .txt) file with its default associated program.

Example:

; ExecFile sample - RUN THIS WINDOWED!
; Win9x users will need to change location of calc.exe

filename$="c:\winnt\system32\calc.exe"

Print "Press any key to run CALC.EXE!"

WaitKey()

ExecFile(filename$)

Print "Press any key to quit."

WaitKey()

Index