Important: The information in this document is obsolete and should not be used for new development.
Writing a Scripting Component
It is possible to create scripting components that execute a variety of scripts, including scripts that can be "run" in some sense but do not consist of statements in a scripting language. For example, script data can consist of an XCMD or even sound data that the appropriate scripting component can trigger or play back when it executes the script (see "Storage Formats for Script Data," which begins on page 10-12).If you are developing a scripting component, you should read the instructions for creating components in the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox. Every scripting component should also
- Provide a component name in the scripting component's component resource that will make sense when displayed to users.
- Support the standard scripting component routines described in "Required Scripting Component Routines," which begins on page 10-30.
- Support some, all, or none of the optional scripting component routines, as appropriate for the tasks to be performed by the scripting component. These routines are described in "Optional Scripting Component Routines," which begins on page 10-45.
- Use the three OSA routines
OSAGetStorageType
,OSAAddStorageType
, andOSARemoveStorageType
to inspect, add, or remove the trailers appended to script data in generic storage descriptor records. These routines are described in "Manipulating Trailers for Generic Storage Descriptor Records," which begins on page 10-91.- Send the Get AETE event when necessary. This event is described in "Handling the Get AETE Event," which begins on page 8-23.