Execute program

Explanation
This function allows your game / program to run external programs. This can be any type of program. You provide the path towards the executable of the program and possible arguments. You can indicate whether the game should wait until the program finishes the execution or whether it should continue running.

Examples
The example below will run an image viewing program called Irfanview - "i_view.exe" (always remember to give the full path and filename to the program, including any file extensions), this is the "prog" part of the function. The "arg" part allows you to send arguments to the executing program, in the below example, I'm saying "as well as running the image viewing program, I want a specific picture, "C:\Half-Life\logo.bmp" to be loaded in also." As I don't want my program to freeze until I've closed "i_view.exe", this is false.

The following example will run IrfanView and load logo.bmp. execute_program("C:\Program Files\IrfanView\i_view32.exe","C:\Half-Life\logo.bmp",false)

Remarks
The execute_program function appeared in its current form in Game Maker version 4.0. In previous versions, the function execute could be used for this purpose with the same arguments.