Mac OS 9 Compiled Script Formats

In Mac OS 9, distributing automated workflows and system scripts relied primarily on the Open Scripting Architecture (OSA) and AppleScript. Rather than distributing plain text, developers shared compiled scripts as standalone applets, drag-and-drop droplets, or raw compiled script files, with optional "run-only" configurations to protect intellectual property. Because the Classic Mac OS utilized the Macintosh file system's dual-fork architecture (data fork and resource fork) and four-character metadata codes, script distribution formats were defined primarily by their File Type and Creator codes rather than standard file extensions.

Compiled Script Files (Type: osas)

A standard compiled script was saved directly from Script Editor with the four-character file type osas. In this format, the human-readable AppleScript source text was translated into compiled byte-code (an abstract syntax tree) stored inside a scpt resource within the file's resource fork.

Compiled scripts could not execute autonomously on double-click; instead, they required a host environment. Users ran them through Script Editor, OSA-aware contextual menus, third-party macro utilities, or via system extensions like the AppleScript Automated Tasks menu.

Run-Only Compiled Scripts

To protect proprietary source code during commercial or enterprise distribution, Mac OS 9 supported saving scripts in a "Run-Only" compiled state. In this variant, Script Editor permanently discarded the human-readable text and internal variable symbol mappings, retaining only the compiled executable bytecode. When an end user attempted to open a Run-Only compiled script in Script Editor, the application barred them from viewing or modifying the source code, while still allowing the script to be run or embedded into other workflows.

Standalone Applets (Type: APPL)

The most common distribution format for general users was the standalone Application, commonly referred to as an "Applet." Applets were saved with the standard Macintosh application file type APPL.

To create an applet, Script Editor copied a minimal runtime application shell (an OSA runner engine) and embedded the compiled script's scpt resource directly into the application's resource fork. When launched, the runtime initialized, called the compiled script’s run handler, and exited upon completion. Applets could also be configured with a "Stay Open" setting, which kept the script running in the background to handle periodic idle events.

Droplets (Type: APPL)

Droplets were structurally identical to applets (using the APPL type code), but were compiled with an open handler. In Mac OS 9, droplets featured distinctive desktop icons depicting an arrow pointing into an application icon. Users could drag and drop files, folders, or volumes onto the droplet from the Finder. The underlying runtime would capture the dropped items' file specifications and pass them into the script's on open (itemList) block.

Run-Only Applets and Droplets

Just like compiled script files, Applets and Droplets could be distributed with the "Run-Only" flag checked. In standard applets, dropping the application back onto Script Editor would decompile and reveal the editable script text. Saving as a Run-Only application stripped the editable source from the scpt resource entirely, preventing users from opening or altering the script within Script Editor while maintaining full standalone executable capability.