Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

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.

-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 of 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.

-t type

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

-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 a compiled script called newscript (assuming that a JavaScript OSA scripting component exists on the system):

                     osacompile -l JavaScript rawscript.txt
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X Internals: A Systems Approach

Mac OS X Internals: A Systems Approach

Amit Singh
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar
Optimized C++

Optimized C++

Kurt Guntheroth

Publisher Resources

ISBN: 0596003706Supplemental ContentCatalog PageErrata