osa.compile

Syntax osa.compile (addrScript, executeOnly, addrCode)

Params addrScript is the Object Database address of a script object.

executeOnly is a boolean value indicating whether the code is to be run only, or should be expandable back into text for editing.

addrCode is the address where the compiled code of the script is to be stored as a binary OSA Script object. (See Notes.)

Action Asks the script server (determined by the script type popup menu) to compile the script, and stores the OSA-compatible result in a binary value at addrCode.

Returns True

Examples osa.compile (@examples.counter, false, @scratchpad.x)
» true

Platform Notes This verb is only implemented in the Mac OS version of Frontier.

Notes The code value created by this verb can be called directly just like a script object. If the script is in the form of a handler, and the script server supports the "call subroutine" event, parameters may be passed to it. (The name of the compiled code

object must match the name of the handler.)

If the executeOnly flag is not set, and the script server supports getting source out of a compiled object, then osa.getSource can be used to reverse the conversion done by this verb.

OSA code values can be called by any OSA client, provided that the script server is available in the system.

See Also script.removeSource

osa.getSource

Discuss