Name: request appleEvent

Synonyms: request ae

Type: command

Syntax: request appleEvent {class|ID|sender|returnID|data [with keyword <aeKey>]}

Summary:
Gets data about an <Apple Event> that was sent to LiveCode.

Introduced: 1.0

OS: mac

Platforms: desktop

Example:
request appleEvent class

Example:
request appleEvent data

Example:
request appleEvent data with keyword "timo"

Parameters:
aeKey:
An Apple event keyword. If you do not specify an aeKey (or any of the
specific forms of the command), the request appleEvent command gets the
data attached to the Apple event.

It:
The information returned by the <request appleEvent> <command> is placed
in the <it> <variable>.

Description:
Use the <request appleEvent> <command> from within an <appleEvent>
<handler> to extract information about a pending <Apple event>.

When a program sends an Apple event, it includes several different
pieces of information. Each piece corresponds to an Apple event keyword.
Use the request appleEvent data with aeKey form of this command to
specify which pieces you want to get.

* The form request appleEvent class is equivalent to request appleEvent
  data with keyword "evcl". It gets the four-character class the Apple
  event belongs to (for example, misc or aevt).


* The form request appleEvent ID is equivalent to request appleEvent
  data with keyword "evid". It gets the four-character name of the
  specific Apple event (for example, dosc or eval).


* The form request appleEvent sender is equivalent to request appleEvent
  data with keyword "addr". It gets the AppleTalk address of the program
  that sent the Apple event to LiveCode.


* The form request appleEvent returnID is equivalent to request
  appleEvent data with keyword "rtid". It gets the Apple event's return
  ID number.


* The form request appleEvent data 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 odoc (open document) event
  sends the file path of the document being opened as the Apple event
  data. 


For more information about Apple events, refer to the section entitled 
"Apple Events Sent by the Mac OS" in the technical documentation section 
located on [Apple's website]
(https://developer.apple.com/documentation/coreservices/apple_events).

References: send to program (command), handler (glossary),
Apple Event (glossary), variable (glossary), command (glossary),
it (keyword), appleEvent (message)

Tags: networking

