SuperTalk is the scripting language used in SuperCard. SuperTalk is a descendant of HyperTalk.
One of the most powerful features SuperCard adds to the HyperTalk language is user properties. Where HyperTalk had a fixed set of properties on its objects, SuperCard scripters can use the define property propName
command to add new properties to buttons and fields. These properties can contain arbitrary text (including numbers and object references, which are also represented using text in xTalks), and even dumps of entire files.
SuperTalk provides several variations on HyperTalk's answer
and answer file
commands, which let one choose several items from a list, choose an icon from all available icons, pick a MIDI instrument to play sound with, or choose a file of a supported image format (including a preview), or disks and folders. Different from HyperTalk's dialogs, SuperTalk answer and ask dialogs do not all resize dynamically to hold more text. However, since SuperCard allows having cards (i.e. "pages") in windows of arbitrary types, one can easily build one's own dialog that is large enough. SuperTalk also has an alert
command that displays standard system alert windows and sheets, including standard system icons.
A switch command is available for more readability in complex conditionals, and various types of media can be recorded (e.g. screen grabs of a card, sound and QuickTime movies). There is also a clone
command that is equivalent to copying and pasting but leaves the clipboard unchanged, an enumeration command that creates global variables with sequential integer values, and recently MetaCard's familiar repeat for each item x
command for iterating through lists was added.
SuperCard also offers exception handling using a try
statement with associated throw
command.
SuperTalk came with a source-level debugger well ahead of HyperCard, but the SuperTalk debugger is a modal window and does not let you set breakpoints by just clicking beside a line. A special trace
command is used to enter the debugger, where one can then view the currently executing line of code, execute commands, evaluate expressions etc. Because of that, the SuperTalk debugger has to be explicitly turned on instead of being available right away when a script error occurs.
The visual effect
command is a little stricter in its syntax, but in exchange supports numerous additional transition effects, including QuickTime transitions and special plug-in modules (stored in data fork resources of type TRAN
). A special kind of external command that does not get unloaded and can own a window has been added. Its type is XRTN
. It differs noticeably from the XCMD protocol, and also doesn't use the xWindoid protocol later introduced for adding windows to HyperTalk.