ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



OSACOMPILE(1)             BSD General Commands Manual            OSACOMPILE(1)

NAME
     osacompile -- compile AppleScripts and other OSA language scripts

SYNOPSIS
     osacompile [-l language] [-e command] [-o name] [-d] [-r type:id] [-t type] [-c creator] [-x] [-s] [-u]
                [-a arch] [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., AppleScript 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-character code.  If this option is
           omitted and the output file does not exist, the creator is set to ``ToyS'', that is, Script Edi-tor. Editor.
           tor.

     -x    Save the resulting script as execute only.

     -s    Stay-open applet.  This option is only valid when a new bundled applet or droplet is being cre-ated. created.
           ated.

     -u    Use startup screen.  This option is only valid when a new bundled applet or droplet is being cre-ated. created.
           ated.

     -a arch
           Create the applet or droplet for the specified target architecture arch.  The allowable values
           are ``i386'' and ``ppc''.  By default, bundled applets and droplets are created as universal
           binaries.  This option is only valid when a new bundled applet or droplet is being created.

     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 nothing in the data fork.  This format is compatible with all Mac OS and Mac OS X systems.

     If the -o option is specified and the file does not already exist, osacompile uses the filename exten-sion extension
     sion to determine what type of file to create.  If the filename ends with ``.app'', a bundled applet or
     droplet will be created.  If the filename ends with ``.scptd'', a bundled compiled script will be cre-ated. created.
     ated.  Otherwise, the resulting script will be placed in the resource fork and/or data fork of the out-put output
     put file depending upon what other options are specified.

     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 10, 2003                        Mac OS X

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.