Home THE HYPERCARD CENTER

HyperTalk Reference
Home » HyperTalk Reference » Commands

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

reply

reply expression [with keyword ¬
   aeKeyword ]
   reply error expression

'Expression' is any text. AeKeyword is an Apple event keyword (a 4-character string).

The reply command answers an incoming Apple event.

If you don’t specify a keyword, expression becomes the direct parameter of the reply.

You use reply error expression to notify the Apple event sender that an error has occurred.

You can use reply error expression to define your own error messages. This form is equivalent to reply expression with keyword "errs". The Apple event keyword “errn” sets the error number.

The reply command sets the result to No current Apple event when there is no current Apple event to handle.

Use reply only if you're handling Apple events yourself. If HyperCard handles an Apple event, it will provide the appropriate information in the reply.

See the documentation for the sending program to know which reply keywords it expects. (errs and errn are standard keywords.)

In AppleScript, you may need to reply with both an error string and an error number to trigger an error clause.


Placeholders

expression
HyperTalk DefinitionAny HyperTalk expression. All expressions evaluate to text, a number, or a constant.

For example:

true
sin(90)
"this is" && it
(3+2) = 5
the heapspace div 1024


Note: Formally, HyperCard distinguishes between factors (simple values) and expressions. The difference between factors and expressions matters only if you like to drop parentheses. Most functions take factors as their parameters, which is why length of 3 + 5 returns 6 and length of (3 + 5) returns 1. In short, always use parentheses to group things the way you want them to evaluate, and you won’t have to worry about the difference between factors and expressions.

AppleScript DefinitionAny series of words that has a value.

Related Topics

« read | HyperTalk Reference | request »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Commands

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

reply

reply expression [with keyword ¬
   aeKeyword ]
   reply error expression

'Expression' is any text. AeKeyword is an Apple event keyword (a 4-character string).

The reply command answers an incoming Apple event.

If you don’t specify a keyword, expression becomes the direct parameter of the reply.

You use reply error expression to notify the Apple event sender that an error has occurred.

You can use reply error expression to define your own error messages. This form is equivalent to reply expression with keyword "errs". The Apple event keyword “errn” sets the error number.

The reply command sets the result to No current Apple event when there is no current Apple event to handle.

Use reply only if you're handling Apple events yourself. If HyperCard handles an Apple event, it will provide the appropriate information in the reply.

See the documentation for the sending program to know which reply keywords it expects. (errs and errn are standard keywords.)

In AppleScript, you may need to reply with both an error string and an error number to trigger an error clause.


Placeholders

expression
HyperTalk DefinitionAny HyperTalk expression. All expressions evaluate to text, a number, or a constant.

For example:

true
sin(90)
"this is" && it
(3+2) = 5
the heapspace div 1024


Note: Formally, HyperCard distinguishes between factors (simple values) and expressions. The difference between factors and expressions matters only if you like to drop parentheses. Most functions take factors as their parameters, which is why length of 3 + 5 returns 6 and length of (3 + 5) returns 1. In short, always use parentheses to group things the way you want them to evaluate, and you won’t have to worry about the difference between factors and expressions.

AppleScript DefinitionAny series of words that has a value.

Related Topics

« read | HyperTalk Reference | request »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View