O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

osacompile

Synopsis

osacompile [-l language] [-e command] [-o name] [-d] [-r typeid] [-t type]
[-c creator] [file
                     ...]

Compiles into a new script file one or more text or compiled OSA script files or standard input.

Options

-c creator

Assign the four-character file-creator code creator to the new script (the default is osas).

-e command

Use command as a line of script to be compiled. You can use more than one -e option; each will specify a new line of script.

-d

Use the dictionary from the application pathname when compiling.

-i pathname

Use the dictionary from the application pathname when compiling.

-l OSAlang

Use OSA language OSAlang instead of the default AppleScript. Use the osalang command (described later in this chapter) to get information on all the system's OSA languages.

-o name

Use name as a filename for the new script instead of the default a.scpt.

-r type:id

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

-s

Make the new applet or droplet be a stay-open applet.

-t type

Assign the four-character file-type code type to the new script (the default is osas).

-u

Make the new applet or droplet use a startup screen.

-x

Save file as execute only. This doesn't produce an applet, but a compiled script file that can't be viewed in Script Editor.

Examples

Use the filename newscript for a new script file, compiled from the source in scripttext.txt:

$ osacompile -o newscript scripttext.txt

Compile the file scripttext.txt into ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required