Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
You can refer to HyperCard objects and other elements from a script in any of several ways.
Click Tips for a list of synonyms that you can use for referring to objects.
An object’s name is the value found in its Info dialog box. For example:
background button "Home"
It’s a good idea to use quotation marks around an object’s name so that HyperCard recognizes it literally and doesn’t look for a variable by that name.
Note: HyperCard interprets card "1812"
as a card named 1812
; it interprets card 1812
as card number 1812
.
An object’s number represents its position among like objects within the object that contains it.
Buttons and fields are ordered within a card or background. Cards and backgrounds are ordered within a stack.
go to card 2
Changing the order of a button, field, card, or background changes its number.
An object or menu's ID is a unique number assigned by HyperCard. Object ID numbers never change. The Info dialog box for each object displays its ID. (Stacks don't have ID's.)
go to card id 5734
A program's ID is its application signature:
put the id of HyperCard -- -> WILD
Part refers to a specific button or field in its ordinal position among all the buttons and fields in that domain:
If you don't specify a domain, the default domain is card.
You can refer to an object using any of the following ordinals:
For example:
go to first card of last background
You can refer to some objects using any of the following positions:
next, prev, previous, this
For example:
Me is one way to refer to an object dynamically. It refers to the object that contains the currently executing handler. With buttons and fields, me
refers to the object itself or to its contents, depending on the context. For example:
The target is another way to refer to an object dynamically. It refers to the object that first received the message currently being handled. With buttons and fields, use the target
to refer to the field itself and target
to refer to its contents.
For example: