System.exec() This page was last modified over 30 day(s) ago and has 0 comment(s)


Back to System Class Summary

Availability
Windows, Mac OSX, Linux

Usage
mdm.System.exec(argument:String):Void

Parameters
argument:String - Application or path to a file

Returns
Nothing

Description
Executes the specified file or application.

Notes
Any file (as long as it has an associated program to open it) or application can be launched using this method. Opening files applies only to Windows and Mac.

If you execute applications with this method, note that you cannot pass arguments to that application with this method. For that it is recommended you use the System.execStdOut() or Process.create() commands.

Example Code
//Simple usage:
mdm.System.exec(mdm.Application.path+"myFile.doc");

//This command can also be used to execute "mailto:" commands to launch email (Windows only):
mdm.System.exec("mailto:techsupport@multidmedia.com");

//Execute an application on Linux:
mdm.System.exec("sol"); // executes solitaire game

mdm.System Class Example Downloads
No Example Downloads Available


Registered Users must be logged in to 'MyAccount' to add a Comment - Log In Here
  After Logging In, Click Here to Refresh This Page