Execute shell

Explanation
The execute_shell function in Game Maker is used to execute a program through the shell. This can be a program, but can also be any type of file for which a file association has been set. If it is given a .bmp file, it launches your default program for .bmp images. If it is given a URL, it launches the default web browser with the specified URL. If it is given a folder directory, it opens a window to show the contents of the folder. The second argument can be any argument that needs to be passed.

Examples
A simple use of this function would be to print an image. To do this you do: execute_shell("mspaint.exe","image.bmp /p"); This opens up the program Microsoft Paint, and then loads the image "image.bmp". The /p is the command that tells mspaint to print the image. Remember to leave a space between the file name and the /p, otherwise the /p will be taken as being part of the file name. It may be a better idea to use a Dll for printing, since then you could specify ceratin things, such as page size, borders, etc. Once the program mspaint opens, you will have to close it again.

To show an html file in the default browser, use execute_shell("file.html","");