<doc>
  <legacy_id>3003</legacy_id>
  <name>launch document</name>
  <type>command</type>
  <syntax>
    <example>launch document <i>filename</i></example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>The System Environment</category>
  </classification>
  <references>
    <command tag="launch url">launch url Command</command>
    <command tag="launch">launch Command</command>
  </references>
  <history>
    <introduced version="2.7.1">Added.</introduced>
    <changed version="2.9"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <web/>
  </classes>
  <security>
    <process/>
  </security>
  <summary>Use the launch command to open a document with the operating system's default program.</summary>
  <examples>
    <example>launch document "/myProjects/myLiveCodeProject/help.pdf"</example>
    <example>launch document (the cSampleImage of me)</example>
  </examples>
  <description>
    <p><i>launch document</i> allows you to open the file  without specifying an application.</p>
<p>The document will be opened using the standard shell association on Windows and Launch Services on Mac OS X.</p>
<p>This means that <i>launch document </i>will have the same result as double clicking the file in Windows Explorer and Mac OS X Finder.</p>
<p>If you want to launch a document with a specific application, use the <command tag="launch">launch command</command> instead, which allows an optional <i>documentName </i>parameter for this purpose.</p>
<p>If launching the document fails, an error message will be placed into <i>the result</i>, otherwise <i>the result</i> will be empty. If non-empty, the message will be one of the following:</p>
<p>"can't open file" - the file was not found or is not accessible</p>
<p>"no association" - no application was found to open the document</p>
<p>"request failed" - an attempt was made to launch the appropriate application but it was unable to fulfill the request</p>
<p>"no memory" - the system ran out of resources or memory while trying to fulfill the request</p>
  </description>
</doc>