Home
The HyperCard Center
HyperTalk Reference

Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.

get

get expression
get [the] property [of object

The get command puts the value of any expression or property into the local variable it.

That is, get expression is the same as put expression into it

Examples

get random(100) -- places a random number into the variable it
put it
get the short name of this card
if it is "Index" then ...
get the userLevel
if it < 3 then ...

Demo Script

on getNumChars
get the number of characters in bkgnd field "Demo Script"
answer "This demo script contains" && it && "characters."
end getNumChars

Related Topics

Placeholders

expression

HyperTalk Definition

Any HyperTalk expression. All expressions evaluate to text, a number, or a constant.

For example:

true
sin(90)
"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 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.

property

HyperTalk Definition

A literal string that names a characteristic of an object (for example, a field or button property) or of HyperCard itself (called a global property).

Properties vary depending on the object and include

the location
the rectangle
the name
the textArrows
the userLevel

AppleScript Definition

A characteristic of an object that has a single value and is identified by a label.

object

HyperTalk Definition

The object HyperCard, or any expression that identifies an object by name, number, or id.

For example:

HyperCard
me
[the] target
button 1
background part 6
card field id 3894
this card
next background
stack "My Stack"

AppleScript Definition

An identifiable part of an application, or a thing within an application that can respond to commands.

HyperTalk Reference

Version 0.8b4 (July 4, 2025)

Made with Macintosh

Switch to Retro View