AppleScript Scripting Additions in Mac OS 9

During the Classic Mac OS era, AppleScript relied heavily on external code libraries known as Scripting Additions—commonly referred to by their file type, OSAX (plural: osaxen). In Mac OS 9, these files lived within the "Scripting Additions" folder inside the System Folder, bridging the gap between AppleScript’s core language syntax and the low-level operating system functions. This article explores the primary built-in and third-party scripting additions that significantly extended AppleScript’s capabilities throughout the Mac OS 9 lifecycle.

Standard Additions: The Native Powerhouse

The most crucial scripting addition bundled with Mac OS 9 was Standard Additions. Developed directly by Apple, it unified several older, fragmented additions into a single, cohesive library. Standard Additions provided the essential commands most scripters took for granted, including:

  • User Interface Interactions: Commands such as display dialog, choose file, choose folder, and choose from list allowed scripts to accept user input visually.
  • File and Disk I/O: Commands like open for access, read, write, and close access granted the ability to read and manipulate plain text and data forks directly on disk without launching a third-party text editor.
  • System Controls: Handlers for clipboard management (set the clipboard to, the clipboard), sound generation (beep), and system timing (delay).
  • Data Conversion: Basic operations for formatting and coercing text, dates, and numbers.

Without Standard Additions, AppleScript in Mac OS 9 was limited largely to dispatching Apple events to scriptable applications, lacking basic native interactive and file-handling mechanisms.

Jon’s Commands

Developed by Jon Pugh, Jon’s Commands became one of the most widely distributed third-party osaxen of the Mac OS 9 era. It filled extensive functional holes in the Classic environment by providing granular system-level controls, including:

  • Screen capturing and sound volume manipulation.
  • Advanced date and time calculations.
  • File management features like checking if a file or folder is busy, calculating file sizes accurately, and resolving aliases.
  • Direct access to hardware and system metrics, such as processor type, battery status on PowerBooks, and screen resolution settings.

Akua Sweets

Created by Mark Alldritt of Late Night Software, Akua Sweets was an expansive, commercial-grade suite designed for heavy automation workflows, print publishing prepress pipelines, and system administration. It granted developers low-level access to:

  • Detailed process management, allowing scripts to monitor, launch, background, and quit specific background applications and processes.
  • Deep resource fork manipulation, making it possible to read, write, and duplicate specific Mac OS rsrc data.
  • Bitwise operations, binary data handling, and fast memory buffers for high-performance string and data processing.

Tanaka’s OSAX

Created by Japanese developer Osamu Tanaka, this collection—including Tanaka’s Osax and specialized tools like OSAX-Finder—was indispensable for text parsing and list processing. Before AppleScript adopted more advanced native text handling, Tanaka’s osaxen provided:

  • Fast regular expression parsing and string replacement.
  • Array sorting, filtering, and list intersection without the slow looping overhead inherent to AppleScript’s native run-time engine.
  • High-speed file sorting and searching across local volumes.

TCP/IP and Network Scripting Additions

Mac OS 9 introduced deeper networking through Open Transport, and specialized scripting additions emerged to allow scripts to communicate over networks:

  • TCP Scripting Addition (TCP/IP OSAX): Enabled raw TCP socket communication, allowing scripts to connect to remote servers, retrieve web pages via HTTP, or interact with POP/SMTP mail servers directly.
  • NetFinder / Internet Scripting: Allowed programmatic control over system network configurations, modem connections, and Remote Access dial-up sessions.

Specialized UI and Utility Additions

Because the Classic Mac OS interface tools were rudimentary, independent developers built osaxen solely to enhance the visual presentation of automated workflows:

  • Dialog Director: Allowed scripters to design complex, multi-element dialog windows featuring checkboxes, radio buttons, and text fields, far surpassing the native three-button limit of display dialog.
  • ACME Script Widgets: A toolkit specialized in string formatting, calculating geographic coordinates, and interacting with low-level QuickDraw display functions.

These scripting additions transformed AppleScript from a simple application-linking macro language into a capable, system-wide administrative environment for Mac OS 9 power users and enterprise production environments.