Name: reply

Type: command

Syntax: reply <string> [with keyword <aeKeyword>]

Syntax: reply error <string>

Summary:
<return|Returns> data to an application that sent LiveCode an 
<Apple Event>. 

Introduced: 1.0

OS: mac

Platforms: desktop, server

Example:
reply "Connection established"

Example:
reply line thisLine of field "AE Replies"

Example:
reply "45" with keyword "errn"

Example:
reply error "Not found."

Parameters:
string (string):
The string to send as Apple event data.

aeKeyword:
The Apple event keyword.

Description:
Use the <reply> <command> to interact with another application via
<Apple Event|Apple events>.

The <reply> <command> for inter-application communication is analogous
to the <return> <control structure> for inter-handler communication.

When a program responds to an Apple event, it returns several different
pieces of information. Each piece corresponds to an Apple event keyword.
Use the reply with aeKeyword form of this command to specify which
pieces you want to reply with.

The form

    reply string

is equivalent to

    reply string with keyword "----"


The form

    reply error string 

is equivalent to

    reply string with keyword "errs"


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] 
(http://developer.apple.com/documentation/coreservices/apple_events).

References: send to program (command), return (constant),
Apple Event (glossary), command (glossary), return (glossary),
control structure (glossary)

Tags: networking

