launch

Declaration

launch (command: LAUNCH_COMMAND; file, parameters: STRING; mode: LAUNCH_MODE; stop_sounds: BOOLEAN)

Description

Use this function to launch an external application or file (commonly an HTML file or web link). If you pass a string for file that begins with 'http://', 'ftp://', etc., the system opens a web browser on that page. This function depends heavily on the target system being installed and configured correctly. Use your own judgement as to whether all of your target machines can access the web or otherwise run your external program.

command   specifies what to do with file. You will almost always pass 'open'
file   the name of the file to open or application to launch. If this is a relative path, the 'externals' location is prepended to it.
parameters   command-line parameters to pass if you are launching an application (ignored on MacOS)
mode   how to open the application (ignored on MacOS)
stop_sounds   if true, the viewer stops all playing sounds. This is useful if you have a sound playing and you don't want it playing while the new application launches.

See Also

system functions

Example

script show_web_page is
  launch ('open', 'http://www.logicat.com', '', 'normal', True)
end

script run_app is
  path := get_full_path ('applications') . '\app.exe'
    -- Windows only because of the separator
  launch ('open', path, '-flag do something', 'minimized', True)
end