Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.
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.
true
sin(90)
"this is" && it
(3+2) = 5
the heapspace div 1024
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.
Commands
Version 0.7b1 (March 24, 2022)