OSACOMPILE(1) | General Commands Manual | OSACOMPILE(1) |
osacompile
—
compile AppleScripts and other OSA language
scripts
osacompile |
[-l language]
[-e command]
[-o name]
[-d ]
[-r type:id]
[-t type]
[-c creator]
[-x ] [-s ]
[-u ] [file ...] |
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-e
command-e
are prepended to the normal source, if any.
Multiple -e
options 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-o
is not specified, the resulting script is
placed in the file “a.scpt”. The value of
-o
partly determines the output file format; see
below.-x
The following options are only relevant when creating a new bundled applet or droplet:
The following options control the packaging of the output file. You should only need them for compatibility with classic Mac OS or for custom file formats.
-d
-r
type:id-t
type-c
creatorIf no options are specified, osacompile
produces a Mac OS X format script file: data fork only, with no type or
creator code.
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”, it creates a bundled applet or droplet. If the
filename ends with “.scptd”, it creates a bundled compiled
script. Otherwise, it creates a flat file with the script data placed
according to the values of the -d
and
-r
options.
To produce a script compatible with classic Mac OS:
osacompile -r scpt:128 -t osas -c
ToyS example.applescript
November 12, 2008 | Mac OS X |