Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
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.
HyperTalk Definition
Any HyperTalk expression. All expressions evaluate to text, a number, or a constant.
For example:
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 Definition
Any series of words that has a value.