Home THE HYPERCARD CENTER

HyperTalk Reference
Home » HyperTalk Reference » Properties

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

script

set [the] script of object to text

The script property returns or sets a text string equal to the script of the specified object in the current stack or in the stack script of another stack.

When you set the script property with the set command, you replace the existing script entirely.


Demo Script

on scriptDemo
  answer "The script of this field is:" & ¬
  return & return & the script of me with "OK"
end scriptDemo

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.

text
An expression that evaluates to a text string.

A text expression can be a literal string surrounded by quotation marks or the value of a container.

For example:

"Hello"
"The sum is:" && 3
card field 1
line 1 of bg fld "Address"
the Message box
the selection
myVar -- a variable
See also: background, bkgnd, button, card, field, menu, menuItem, and stack

Related Topics

« right | HyperTalk Reference | scriptEditor »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Properties

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

script

set [the] script of object to text

The script property returns or sets a text string equal to the script of the specified object in the current stack or in the stack script of another stack.

When you set the script property with the set command, you replace the existing script entirely.


Demo Script

on scriptDemo
  answer "The script of this field is:" & ¬
  return & return & the script of me with "OK"
end scriptDemo

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.

text
An expression that evaluates to a text string.

A text expression can be a literal string surrounded by quotation marks or the value of a container.

For example:

"Hello"
"The sum is:" && 3
card field 1
line 1 of bg fld "Address"
the Message box
the selection
myVar -- a variable
See also: background, bkgnd, button, card, field, menu, menuItem, and stack

Related Topics

« right | HyperTalk Reference | scriptEditor »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View