Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » edit script

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

edit script

edit [the] script of object

The edit script command opens the script of an object with the HyperCard script editor.

When run as a statement in a handler, edit script suspends execution of the handler until the user closes the script editor or activates the card window.

Note: Even though HyperCard itself is an object (it can receive messages), it does not have a script. The following statement yields an error:

edit the script of HyperCard

For this command to work, the userLevel property must be set to 5.

Examples

edit the script of this card
edit script of background 2
edit script of card button 1 of card 1
edit script of last background part
edit script of stack "Home"
edit script of this stack

Demo Script

on openScriptWindow
set the script of bkgnd field "Demo Script" to¬
"-- Click the close box to close this script window!"
edit script of bkgnd field "Demo Script"
end openScriptWindow

Related Topics

Placeholders

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