Home THE HYPERCARD CENTER

HyperTalk Reference
Home » 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.

enable

enable menu
enable menuItem of menu
enable button

The enable command activates menu items, entire menus, or buttons that are inactive (dimmed). It’s a shortcut for setting the enabled property to true.

The enable command enables only items in HyperCard’s menus that are currently available to the user. For example, the following command will not enable the Button Info command in the Objects menu unless a button is currently selected:

enable menuItem 1 of menu "Objects"

Examples

enable menu "File"
enable menu 2
enable second menu
enable menuItem "New" of menu "File"
enable menuItem 2 of menu 2
enable second menuItem of second menu
enable background button 3
enable last button

Related Topics

Placeholders

menu

An expression that evaluates to one of the following:

menu text
menu posInteger
ordinal menu

For example:

menu "File"
menu 2
second menu

menuItem

An expression that evaluates to one of the following:

menuItem text
menuItem posInteger
ordinal menuItem

For example:

menuItem "New"
menuItem 2
second menuItem

button

HyperTalk Definition

An expression that identifies a button by name, number, or id, using one of the following forms:

[card] button id posInteger [of card]
[card] button text [of card] -- name
[card] button posInteger [of card]
ordinal [card] button [of card]
bkgnd button id posInteger [of card]
bkgnd button text [of card] -- name
bkgnd button posInteger [of card]
ordinal bkgnd button [of card]

For example:

card button id 3894
card button "Return"
card button 1
first card button
bkgnd button 2 of card 2
last bkgnd button

When used inside a button script: me

When a button receives a message: [the] target

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”.

HyperTalk Reference


Version 0.8b4 (July 4, 2025)

Made with Macintosh

Switch to Modern View