Starts up an application, optionally opening a document in the application.
# Metadata
Platforms: desktop, server OS: mac, windows, linux Introduced: 1.0 Security: process
# Syntax
launch [documentPath with] applicationPath
# Params
- documentPath : The location and name of a file to open with the specified application. If no path is specified, the launch command assumes that the file is in the defaultFolder. - applicationPath : The location and name of the application to start up. If no path is specified, the launch command assumes that the application is in the defaultFolder.
# Examples
launch "SimpleText"
launch "/Documents/Projects/test.txt" with myApp
launch it with (field "Application")
# Description
When the launch command executes, the application being launched comes to the foreground. When the user quits, LiveCode comes to the foreground.
If no documentPath is specified, the following two statements are equivalent:
launch application open process application for neither
>*Note:* On OS X systems, you can use the launch command to start up > an application, but not a Unix process. To work with a Unix process, > use the shell function instead.
>*Tip:* On Windows systems, you can also start up an application by > using the shell function with the Windows "start" command:
get shell("start MyProgram.exe")
# Tags
# See
- **property:** hideConsoleWindows, secureMode - **command:** launch url, kill, launch document - **function:** shell - **glossary:** command