HyperTalk is a high-level programming language created in 1987 by Dan Winkler and used in conjunction with Apple Computer's HyperCard hypermedia program by Bill Atkinson. A programming language is an Artificial language that can be used to write programs which control the behavior of a machine particularly a Computer. Apple Inc, ( formerly Apple Computer Inc, is an American Multinational corporation with a focus on designing and manufacturing Consumer electronics HyperCard was an Application program created by Bill Atkinson for Apple Computer Inc Bill Atkinson (born 1951 is an American Computer engineer and Photographer. The main target audience of HyperTalk was beginning programmers, hence HyperTalk programmers were usually called authors, and the process of writing programs was called "scripting". "Scripting" redirects here For other uses see Script. HyperTalk scripts are fairly similar to written English, and use a logic structure similar to the Pascal programming language. English is a West Germanic language originating in England and is the First language for most people in the United Kingdom, the United States Pascal is an influential imperative and procedural Programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small
The case-insensitive language was at first interpreted, but since HyperCard 2. x 'virtually compiled'. A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another It supports the basic control structures of procedural languages: repeat for/while/until, if/then/else, as well as function and message "handler" calls (a handler is a subroutine, a message handler is a procedure). Procedural programming can sometimes be used as a synonym for Imperative programming (specifying the steps the program must take to reach the desired state but can also Data types are transparent to the user, conversion happens transparently in the background between strings and numbers. A data type in Programming languages is an attribute of a datum which tells the computer (and the programmer something about the kind of datum it is In Computer programming and some branches of Mathematics, a string is an ordered Sequence of Symbols. There are no classes or data structures in the traditional sense; their place was taken by special string literals, or rather "lists" of "items" delimited by a certain character (in later versions the "itemDelimiter" property allowed choosing an arbitrary character). In Object-oriented programming, a class is a Programming language construct that is used as a blueprint to create objects This blueprint includes attributes A data structure in Computer science is a way of storing Data in a computer so that it can be used efficiently A string literal is the representation of a string value within the Source code of a Computer program.
Contents |
HyperTalk was by no means a strictly procedural language. Scripts were associated with objects in HyperCard files (so-called "stacks"), and HyperTalk allowed manipulating these objects in various ways, changing their properties using the "set" command, for example. HyperCard was an Application program created by Bill Atkinson for Apple Computer Inc Objects were addressed using a syntax close to natural language, where objects were specified relative to the current card, or the of operator was used to specify the absolute position of an object: send "mouseUp" to card button "OK" of card "Veracity". Since buttons and fields could also exist on the background layer, but their content would differ between cards, there were card fields, background fields etc. Objects could be addressed by their name, z-ordering number, or by a unique ID number that usually did not change throughout an object's lifetime. This article is about a graphical user interface concept for the space filling curve see Z-order (curve Z-order is an ordering of overlapping To iterate over objects (joinedly referred to as parts in HyperCard 2. 2 and later), one simply used their number after querying e. g. the number of card parts.
HyperTalk also provided full-blown script control over the built-in drawing tools, simply by scripting the needed changes in paint tools and simulating mouse movements using the drag from start to end and the click at position commands.
HyperTalk also used messages (i. e. events) sent to objects to handle user interaction. E. g. the mouseDown message was sent to a button when the user clicked it, and mouseUp was sent when the user released the mouse inside it to trigger its action. Similarly, it had the periodic idle message, mouseEnter, mouseLeave, . . . and various other messages related to navigation between different cards in a HyperCard stack, as well as user input (keyDown, functionKey, . . . ), and system events. As far as the scripters were concerned, there were no main event loops like in other procedural programming languages.
Although the HyperTalk language languished just like HyperCard itself, it received a second lease on life through its plugin protocol, so-called External Commands (XCMDs) and External Functions (XFCNs), which were native code containers attached to stacks (as Macintosh-specific resources) with a single entry point and return value. The resource fork is a construct of the Mac OS Operating system used to store structured data in a file alongside unstructured data stored within the data fork XCMDs and XFCNs could be called just like regular message and function handlers from HyperTalk scripts, and were also able to send messages back to the HyperCard application. Some enterprising XCMD authors added advanced features like full color support (ColorizeHC, HyperTint, AddColor), multiple special-purpose windows (Prompt, Tabloid, Textoid, Listoid, ShowDialog, MegaWindows), drag and drop support and various hardware interfaces to the language.
Various scripting languages have taken their cues from HyperTalk. "Scripting" redirects here For other uses see Script. They are commonly regrouped in a loosely defined family named xTalk. xTalk is a loosely defined family of Scripting languages. The father of all xTalk languages is HyperTalk, the language used by Apple's HyperCard
As well as second-level clones like
Many method names first popularized by HyperTalk made it into later languages, such as the onmouseUp message in JavaScript. Although Asymetrix ToolBook is often also considered a HyperCard clone, its scripting language apparently bears little resemblance to HyperTalk. ToolBook is an E-learning content development application developed and published by SumTotal Systems.
These clones and dialects (commonly referred to under the moniker of xTalk-languages) added various features to the language that are expected from a modern programming language, like exception handling, user-defined object properties, timers, multi-threading and even user-defined objects. xTalk is a loosely defined family of Scripting languages. The father of all xTalk languages is HyperTalk, the language used by Apple's HyperCard
on mouseUp
put "100,100" into pos
repeat with x = 1 to the number of card buttons
set the location of card button x to pos
add 15 to item 1 of pos
end repeat
end mouseUp
on mouseDown
put "Disk:Folder:MyFile" into filePath -- no need to declare variables
if there is a file filePath then
open file filePath
read from file filePath until return
put it into cd fld "some field"
close file filePath
set the textStyle of character 1 to 10 of card field "some field" to bold
end if
end mouseDown
function replaceStr pattern,newStr,inStr
repeat while pattern is in inStr
put offset(pattern,inStr) into pos
put newStr into character pos to (pos +the length of pattern)-1 of inStr
end repeat
return inStr
end replaceStr