<doc>
  <legacy_id>1385</legacy_id>
  <name>request appleEvent</name>
  <type>command</type>
  <syntax>
    <example>request appleEvent {class|ID|sender|returnID|data [with keyword <i>aeKey</i>]}</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
    <synonym>request ae</synonym>
  </synonyms>
  <classification>
    <category>The System Environment</category>
    <category>Networks &amp; Communication</category>
  </classification>
  <references>
    <command tag="send to program">send to program Command</command>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
  </platforms>
  <classes>
    <desktop/>
  </classes>
  <security>
  </security>
  <summary>Gets data about an <glossary tag="Apple Event">Apple event</glossary> that was sent to LiveCode.</summary>
  <examples>
    <example>request appleEvent class</example>
    <example>request appleEvent data</example>
    <example>request appleEvent data with keyword "timo"</example>
  </examples>
  <description>
    <p>Use the <b>request appleEvent</b> <glossary tag="command">command</glossary> from within an <message tag="appleEvent">appleEvent</message> <glossary tag="handler">handler</glossary> to extract information about a pending <glossary tag="Apple Event">Apple event</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>aeKey</i> is an <glossary tag="Apple Event">Apple event</glossary> <glossary tag="keyword">keyword</glossary>. If you do not specify an <i>aeKey</i> (or any of the specific forms of the <glossary tag="command">command</glossary>), the <b>request appleEvent</b> <glossary tag="command">command</glossary> gets the data attached to the <glossary tag="Apple Event">Apple event</glossary>.</p><p/><p><b>Comments:</b></p><p>The information returned by the <b>request appleEvent</b> <glossary tag="command">command</glossary> is placed in the <keyword tag="it">it</keyword> <glossary tag="variable">variable</glossary>.</p><p/><p>When a program sends an Apple event, it includes several different pieces of information. Each piece corresponds to an Apple event keyword. Use the<code> request appleEvent data with aeKey f</code>orm of this command to specify which pieces you want to get.</p><p/><p>* The form<code> request appleEvent class </code>is equivalent to<code> request appleEvent data with keyword "evcl</code>". It gets the four-character class the Apple event belongs to (for example,<code> misc </code>or<code> aevt</code>).</p><p/><p>* The form<code> request appleEvent ID </code>is equivalent to<code> request appleEvent data with keyword "evid"</code>. It gets the four-character name of the specific Apple event (for example,<code> dosc </code>or<code> eval</code>).</p><p/><p>* The form<code> request appleEvent sender </code>is equivalent to<code> request appleEvent data with keyword "addr"</code>. It gets the AppleTalk address of the program that sent the Apple event to LiveCode.</p><p/><p>* The form<code> request appleEvent returnID </code>is equivalent to<code> request appleEvent data with keyword "rtid"</code>. It gets the Apple event's return ID number.</p><p/><p>* The form<code> request appleEvent data </code>gets the data associated with the Apple event. The meaning of this data depends on which kind of Apple event is being handled. For example, the<code> odoc </code>(open document) event sends the file path of the document being opened as the Apple event data.</p><p/><p>For more information about Apple events, see Apple Computer's technical documentation, <i>Inside Macintosh: Interapplication Communication</i>, located at &lt;<u>http://developer.apple.com/techpubs/mac/IAC/IAC-2.html</u>&gt;.</p>
  </description>
</doc>