osa.getSource

Syntax osa.getSource (addrCode, addrScript)

Params addrCode is the address of a binary object containing compiled OSA script code.

addrScript is the Object Database address where a script object containing the source of the code object is to be created.

Action Asks the script server (determined by the embedded script type in the code value) for the source text of the script code, and creates a new script object at addrScript containing the text.

Returns True

Examples rez.getResource (scriptPath, 128, 'scpt', @code);
osa.getSource (@code, @scratchpad.scriptSource)
» true

Errors If the script code was created as execute-only, or the script server doesn-t support getting source text from code values, an error is generated.

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

Notes This verb is effectively the inverse of osa.compile. It can be applied to any OSA-compatible 'scpt' script resource.

See Also osa.compile

Discuss