Important: The information in this document is obsolete and should not be used for new development.
OSAGenericToRealID
You can use theOSAGenericToRealIDfunction to convert a generic script ID to the corresponding component-specific script ID.
FUNCTION OSAGenericToRealID (genericScriptingComponent: ComponentInstance; VAR theScriptID: OSAID; VAR theExactComponent: ComponentInstance) : OSAError;
genericScriptingComponent- A component instance for the generic scripting component, created by a prior call to the Component Manager function
OpenDefaultComponentorOpenComponent(see page 10-4).theScriptID- The generic script ID that you want to convert. The
OSAGenericToRealIDfunction returns, in this parameter, the component-specific script ID that corresponds to the generic script ID that you pass in this parameter.theExactComponent- The
OSAGenericToRealIDfunction returns, in this parameter, the component instance that created the script ID returned in thetheScriptIDparameter.DESCRIPTION
You can't use the generic scripting component and a generic script ID with component-specific routines. Instead, you can use the component instance and script ID returned byOSAGenericToRealID.Given a generic script ID (that is, a script ID returned by a call to a standard component routine via the generic scripting component), the
OSAGenericToRealIDfunction returns the equivalent component-specific script ID and the component instance that created that script ID. TheOSAGenericToRealIDfunction modifies the script ID in place, changing the generic script ID you pass in thetheScriptIDparameter to the corresponding component-specific script ID.RESULT CODES
noErr 0 No error errOSACantOpenComponent -1762 Can't connect to scripting component badComponentInstance $80008001 Invalid component instance