previous up next     contents index
Next: Changing the System Up: Starting Up Previous: Starting Up

Starting MrEd on the Macintosh

While command line flags cannot be specified directly when starting MrEd on the Macintosh, startup files from the Finder (sent to MrEd by drag-and-drop on the MrEd Finder icon or because the user double-clicked on a file with the 'MrEd' creator) can be used to pass command line arguments indirectly.

The method for passing command line flags to MrEd on the Macintosh is a strange extension of an old Unix hack. To pass command line arguments, MrEd must be started with a single startup file. The data fork of this file must begin with a pound sign followed by an exclamation point (``#!''). Starting with the next whitespace, the rest of the first line in the file is used as the command line for MrEd.

There are several special parsing considerations for this ``command line'':

The Macintosh version of MrEd recognizes an additional command line flag at startup time: ``-r ''. This flag must appear before all other flags, and it must be followed by a filename. This resource fork of this file will be opened while MrEd is running. The primary use for the ``-r'' flag is to change the ``splash screen '', the dialog that appears while MrEd is loading. This dialog is read as from the 'DLOG' resource 128. Multiple ``-r'' flags can be provided, but they must precede all other flags in the command line.


previous up next     contents index
Next: Changing the System Up: Starting Up Previous: Starting Up

PLT