Important: The information in this document is obsolete and should not be used for new development.
ASSetSourceStyles
You can use theASSetSourceStylesfunction to set the script format styles used by the AppleScript component to display scripts.
FUNCTION ASSetSourceStyles (scriptingComponent: ComponentInstance; sourceStyles: STHandle): OSAError;
scriptingComponent- A component instance created by a prior call to the Component Manager function
OpenDefaultComponentorOpenComponent(see page 10-4).sourceStyles- A handle to a style element array defined by the TextEdit data type
TEStyleTablethat defines the nine styles used for different kinds of AppleScript terms. The style for each kind of term should be identified according to the index constants listed forASGetSourceStyleson page 10-81.DESCRIPTION
TheASSetSourceStylesfunction sets the script format styles used to display scripts. If you pass aNILhandle in thesourceStylesparameter, the AppleScript component uses its default styles.After you have set the script format styles, you must dispose of the style element array you used to specify them.
RESULT CODES
noErr 0 No error errOSASystemError -1750 General scripting system error badComponentInstance $80008001 Invalid component instance SEE ALSO
For information about theTEStyleTablearray, see Inside Macintosh: Text.