OSACOMPILE(1)           System General Commands Manual           OSACOMPILE(1)

NAME
     osacompile - compile OSA scripts

SYNOPSIS
     osacompile [-l language] [-e command] [-o name] [-d] [-r type:id]
                [-t type] [-c creator] [-x] [file ...]

DESCRIPTION
     osacompile compiles the given files, or standard input if none are
     listed, into a single output script.  Files may be plain text or other
     compiled scripts.  The options are as follows:

     -l language
           Override the language for any plain text files.  Normally, plain
           text files are compiled as AppleScript.

     -e command
           Enter one line of a script.  Script commands given via -e are
           prepended to the normal source, if any.  Multiple -e commands may
           be given to build up a multi-line script.  Because most scripts use
           characters that are special to many shell programs (e.g., Apple-
           Script uses single and double quote marks, ``('', ``)'', and
           ``*''), the command will have to be correctly quoted and escaped to
           get it past the shell intact.

     -o name
           Place the output in the file name.  If -o is not specified, the
           resulting script is placed in the file ``a.scpt''.

     -d    Place the resulting script in the data fork of the output file.

     -r type:id
           Place the resulting script in the resource fork of the output file,
           in the specified resource.

     -t type
           Set the output file type to type.  Type is a four-character code.
           If this option is omitted and the output file does not exist, the
           type is set to ``osas'', that is, a compiled script.

     -c creator
           Set the output file creator to creator.  Creator is a four-charac-
           ter code.  If this option is omitted and the output file does not
           exist, the creator is set to ``ToyS'', that is, Script Editor.

     -x    Save the resulting script as execute only.

     If no options are specified, osacompile produces a classic Mac OS format
     script file, that is, type ``osas'' (compiled script), creator ``ToyS''
     (Script Editor), with the script data in the scpt:128 resource and noth-
     ing in the data fork.  This format is compatible with all Mac OS and Mac
     OS X systems.

     The -d and -r options are not exclusive.  If exactly one is specified,
     the script is written only to that fork.  If both are specified, the
     script is written to both forks.

SEE ALSO
     osascript(1), osalang(1)

Mac OS X                         June 12, 2001                        Mac OS X