Name
osacompile
Synopsis
osacompile [-llanguage] -ecommand] -oname] [-d] [-rtypeid] [-ttype] -ccreator] [file...]
Compiles into a new script file one or more text or compiled OSA script files or standard input.
Options
-
-ccreator Assign the four-character file-creator code creator to the new script (the default is
osas).-
-ecommand Use command as a line of script to be compiled. You can use more than one
-eoption; each will specify a new line of script.-
-ipathname Use the dictionary from the application pathname when compiling.
-
-lOSAlang Use OSA language OSAlang instead of the default AppleScript. Use the
osalangcommand (described later in this chapter) to get information on all of the system’s OSA languages.-
-oname Use name as a filename for the new script instead of the default a.scpt.
-
-rtype:id Place the resulting script in the resource fork of the output file, in the resource specified by type:id.
-
-ttype 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