HyperTalk - Concise Study Outline
[English]
HyperTalk Scripting Language
- HyperTalk (TM) is Apple HyperCard's scripting language. You use it to write English-like statements that respond to events (such as when the user clicks a button or goes to a new card). In fact, HyperTalk is an object-oriented 4th generation computer programming language (4GL), which is ideal for rapid-application development (RAD).
- In HyperTalk, responding to an event is called handling the event. As a scripter, you write a specific handler for each event that you want your stack to handle. A collection of handlers is called a script.
- An event is some occurrence, such as a key press or mouse click, that HyperCard translates into the name of a message. A message is simply an announcement that an event has occurred.
- A handler is a block of HyperTalk statements, contained in the script of an object, that executes in response to a message or a function call matching the handler's name. Handlers defined using the function keyword are called function handlers. You use function handlers to return a value to the handler that calls it.
- A script is a collection of handlers, written in HyperTalk or some other HyperCard-compatible language, associated with a particular object. An object is an element of the HyperCard environment that has a script associated with it and that can send and receive messages. There are 5 kinds of HyperCard objects: buttons, fields, cards, backgrounds, and stacks.
- As a scripter, you write message handlers to respond to messages. When an object receives a message, HyperCard searches the object's script for a handler with the same name (a handler starts with the word "on" followed by the name of a message). If HyperCard finds a match, it runs any HyperTalk statements in the handler until it hits an "end" statement. For example, if you want a button to respond to a "mouseUp" message, you would add a "mouseUp" message handler to its script, i.e., "on mouseUp", "beep 1", "end mouseUp".
- Although the HyperTalk scripting language was originally designed for Apple HyperCard application on the Apple Macintosh platform, the knowledge of the scripting language applies to other xTalk environments, e.g., AppleScript, SuperTalk (SuperCard), MetaTalk (MetaCard), Lingo (Director), etc.
- Multiple Choice Certification Examinations will test the knowledge of how to configure the environment, how to code in HyperTalk, how to manipulate objects, how to solve mathematical problems, etc.