Home THE HYPERCARD CENTER

HyperTalk Reference
Home » HyperTalk Reference » Commands

Note: This is a work in progress and will be formatting errors. 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

Placeholders

object
HyperTalk DefinitionThe 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 DefinitionAn identifiable part of an application, or a thing within an application that can respond to commands.

Related Topics

« drag | HyperTalk Reference | enable »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Commands

Note: This is a work in progress and will be formatting errors. 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

Placeholders

object
HyperTalk DefinitionThe 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 DefinitionAn identifiable part of an application, or a thing within an application that can respond to commands.

Related Topics

« drag | HyperTalk Reference | enable »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View