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., 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.
-s Stay-open applet. This option is only valid when a new bundled
applet or droplet is being created.
-u Use startup screen. This option is only valid when a new bundled
applet or droplet is being created.
-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 ``fat''. 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 noth-
ing 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 extension 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 com-
piled script will be created. Otherwise, the resulting script will be
placed in the resource fork and/or data fork of the output 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
|