Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
The print
command prints card images, the contents of fields and buttons, documents from other programs, or the value of any HyperTalk expression.
Print card
prints an image of the current card. The option from point1 to point2
specifies a rectangular area of the card.
Print all cards
prints the image of every card in the stack.
Print marked cards
prints a subset of the cards in the stack based on each card’s marked
property (as reflected in its Card Info dialog box). You can mark cards with the mark
command.
Print posInteger cards
prints a range of consecutive cards starting from the current card.
Print card
prints the card specified by the card expression. The option from point1 to point2
specifies a rectangular area of the card. HyperCard sets the function the result
to "No such card."
if the specified card doesn’t exist; otherwise, the result
returns empty
.
Print button
prints the contents of the specified button.
Print field
prints the contents of the specified field, preserving the fonts, sizes, and styles of text used in the field.
Print file with application
prints a document using another program. HyperCard launches the application; the application tries to print the document. (The user might see a Print dialog box.)
If HyperCard can't find either the document or the application, it displays a directory dialog box and asks the user to find it.
HyperCard also sets the result
to Cancel
if the user clicks Cancel in the dialog box. Otherwise, it sets the result
to empty
.
If HyperCard has problems opening the application (for example, there’s not enough memory), it sets the result
to "Couldn't open that application."
After printing, the application program quits, and control returns to HyperCard.
Finally,print expression
prints the value of any HyperTalk expression. You can print the values of local and global variables, fields, chunk
expressions, the current selection, the contents of the Message box, and the result of any function or property.
Expressions are printed using the settings in printMargins, printTextAlign, printTextFont, printTextSize, printTextHeight,
and printTextStyle
.
An expression that evaluates to a positive integer.
For example:
See also: background
, bkgnd
, button
, card
, chunk
, field
, menu
, and menuItem
An expression that identifies a card by name, number, or id using one of the following forms (in AppleScript, use “background” in place of “bkgnd”):
For example:
When used inside a card script in HyperTalk: me
When a card receives a message: [the] target
See also: button
and field
An expression that identifies a field by name, number, or id using one of the following forms (in AppleScript, use “background” in place of “bkgnd”):
-- name
card field id 3894
card field "My Notes"
card field 1
first card field
background field 3 of card 1
HyperTalk Definition An expression that identifies a button by name, number, or id, using one of the following forms: For example: When used inside a button script: When a button receives a message: A button can also be referred to as a part when you’re talking about its position among all buttons and fields within the same card or background. AppleScript Definition An expression that identifies a button by name, number, or id, using the same forms as HyperTalk except that “background” must be used in place of “bkgnd”. An expression that evaluates to a text string that is also a valid Macintosh filename. For example: An expression that evaluates to a text string and that is also the name of a Macintosh application. 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 AppleScript Definition Any series of words that has a value. One of the following forms (or combinations thereof): For example: A chunk combined with Important: You can’t combine a stack name with a chunk expression—you can only refer to a chunk in the current stack.button
me
[the] target
fileName
application
expression
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.chunk
of
and a container is called a chunk expression. For example: line 1 of card field "index"