||THE HYPERCARD CENTER
Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.
do expression [as scriptLanguage]
do keyword forces HyperCard to evaluate
expression and to send the result as a message to the current card.
The value of
expression can contain more than one line. For example, if you have a series of statements in a card field called Example, HyperCard will apply
do to each line:
do card field "Example"
When you use the
as scriptLanguage form, HyperCard executes the script in
expression using the OSA-compliant scripting component named in
do field 1 as AppleScript do theScript as UserTalk
You can also send
do from the Message box.
put the number of lines of bkgnd field "Demo Script" into N
do line (N - 2) to N of bkgnd field "Demo Script"
HyperTalk DefinitionAny HyperTalk expression. All expressions evaluate to text, a number, or a constant.
"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
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.
| exit »